home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / mc-3.2 / mc-3 / mc-3.2.1 / configure < prev    next >
Encoding:
Text File  |  1996-05-17  |  167.6 KB  |  7,043 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.7 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-x                use the X Window System"
  16. ac_help="$ac_help
  17. --with-xview              Use the XView toolkit"
  18. ac_help="$ac_help
  19. --with-xview-includes=path  Specifies XView includes directory"
  20. ac_help="$ac_help
  21. --with-xview-libraries=path  Specifies XView libraries directory"
  22. ac_help="$ac_help
  23. --with-xv-bindir=dir  Specifies directory where to install XView version"
  24. ac_help="$ac_help
  25. --with-gpm-mouse=base-dir  Specifies the base gpm directory"
  26. ac_help="$ac_help
  27. --with-sco                 Use this on SCO for the subshell support"
  28. ac_help="$ac_help
  29. --with-sunos-curses        Used to force SunOS 4.x curses"
  30. ac_help="$ac_help
  31. --with-osf1-curses       Used to force OSF/1 curses"
  32. ac_help="$ac_help
  33. --with-vcurses[=incdir]    Used to force SysV curses"
  34. ac_help="$ac_help
  35. --with-ncurses[=base-dir]    Compile with ncurses/locate base dir"
  36. ac_help="$ac_help
  37. --with-tk                  Use the Tk toolkit"
  38. ac_help="$ac_help
  39. --with-tk-includes=dir     Specifies the Tcl/Tk header directory"
  40. ac_help="$ac_help
  41. --with-tk-libraries=dir    Specifies the Tcl/Tk library directory"
  42. ac_help="$ac_help
  43. --with-dusum               Support the du -s summaries"
  44. ac_help="$ac_help
  45. --with-termnet             If you want a termified net support"
  46. ac_help="$ac_help
  47. --with-subshell            If you want to use a concurrent shell"
  48. ac_help="$ac_help
  49. --with-debug               For use by developers only: activates -Wall and MAD"
  50. ac_help="$ac_help
  51. --with-efence              Developers only: activates -Wall and efence"
  52. ac_help="$ac_help
  53. --with-mmap                To force using the mmap call (AIX)"
  54. ac_help="$ac_help
  55. --with-terminfo            SLANG: Force usage of terminfo"
  56. ac_help="$ac_help
  57. --with-termcap             SLANG: Force usage of termcap"
  58. ac_help="$ac_help
  59. --with-slang           Compile with the slang screen manager"
  60. ac_help="$ac_help
  61. --with-vfs           Compile with the VFS code"
  62. ac_help="$ac_help
  63. --with-netrc               Compile with ftp .netrc support"
  64. ac_help="$ac_help
  65. --with-ext2undel[=ext2dir] Compile with ext2 undelete code"
  66.  
  67. # Initialize some variables set by options.
  68. # The variables have the same names as the options, with
  69. # dashes changed to underlines.
  70. build=NONE
  71. cache_file=./config.cache
  72. exec_prefix=NONE
  73. host=NONE
  74. no_create=
  75. nonopt=NONE
  76. no_recursion=
  77. prefix=NONE
  78. program_prefix=NONE
  79. program_suffix=NONE
  80. program_transform_name=s,x,x,
  81. silent=
  82. site=
  83. srcdir=
  84. target=NONE
  85. verbose=
  86. x_includes=NONE
  87. x_libraries=NONE
  88. bindir='${exec_prefix}/bin'
  89. sbindir='${exec_prefix}/sbin'
  90. libexecdir='${exec_prefix}/libexec'
  91. datadir='${prefix}/share'
  92. sysconfdir='${prefix}/etc'
  93. sharedstatedir='${prefix}/com'
  94. localstatedir='${prefix}/var'
  95. libdir='${exec_prefix}/lib'
  96. includedir='${prefix}/include'
  97. oldincludedir='/usr/include'
  98. infodir='${prefix}/info'
  99. mandir='${prefix}/man'
  100.  
  101. # Initialize some other variables.
  102. subdirs=
  103. MFLAGS= MAKEFLAGS=
  104.  
  105. ac_prev=
  106. for ac_option
  107. do
  108.  
  109.   # If the previous option needs an argument, assign it.
  110.   if test -n "$ac_prev"; then
  111.     eval "$ac_prev=\$ac_option"
  112.     ac_prev=
  113.     continue
  114.   fi
  115.  
  116.   case "$ac_option" in
  117.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  118.   *) ac_optarg= ;;
  119.   esac
  120.  
  121.   # Accept the important Cygnus configure options, so we can diagnose typos.
  122.  
  123.   case "$ac_option" in
  124.  
  125.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  126.     ac_prev=bindir ;;
  127.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  128.     bindir="$ac_optarg" ;;
  129.  
  130.   -build | --build | --buil | --bui | --bu)
  131.     ac_prev=build ;;
  132.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  133.     build="$ac_optarg" ;;
  134.  
  135.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  136.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  137.     ac_prev=cache_file ;;
  138.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  139.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  140.     cache_file="$ac_optarg" ;;
  141.  
  142.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  143.     ac_prev=datadir ;;
  144.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  145.   | --da=*)
  146.     datadir="$ac_optarg" ;;
  147.  
  148.   -disable-* | --disable-*)
  149.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  150.     # Reject names that are not valid shell variable names.
  151.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  152.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  153.     fi
  154.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  155.     eval "enable_${ac_feature}=no" ;;
  156.  
  157.   -enable-* | --enable-*)
  158.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  159.     # Reject names that are not valid shell variable names.
  160.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  161.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  162.     fi
  163.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  164.     case "$ac_option" in
  165.       *=*) ;;
  166.       *) ac_optarg=yes ;;
  167.     esac
  168.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  169.  
  170.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  171.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  172.   | --exec | --exe | --ex)
  173.     ac_prev=exec_prefix ;;
  174.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  175.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  176.   | --exec=* | --exe=* | --ex=*)
  177.     exec_prefix="$ac_optarg" ;;
  178.  
  179.   -gas | --gas | --ga | --g)
  180.     # Obsolete; use --with-gas.
  181.     with_gas=yes ;;
  182.  
  183.   -help | --help | --hel | --he)
  184.     # Omit some internal or obsolete options to make the list less imposing.
  185.     # This message is too long to be a string in the A/UX 3.1 sh.
  186.     cat << EOF
  187. Usage: configure [options] [host]
  188. Options: [defaults in brackets after descriptions]
  189. Configuration:
  190.   --cache-file=FILE       cache test results in FILE
  191.   --help                  print this message
  192.   --no-create             do not create output files
  193.   --quiet, --silent       do not print \`checking...' messages
  194.   --version               print the version of autoconf that created configure
  195. Directory and file names:
  196.   --prefix=PREFIX         install architecture-independent files in PREFIX
  197.                           [$ac_default_prefix]
  198.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  199.                           [same as prefix]
  200.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  201.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  202.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  203.   --datadir=DIR           read-only architecture-independent data in DIR
  204.                           [PREFIX/share]
  205.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  206.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  207.                           [PREFIX/com]
  208.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  209.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  210.   --includedir=DIR        C header files in DIR [PREFIX/include]
  211.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  212.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  213.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  214.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  215.   --program-prefix=PREFIX prepend PREFIX to installed program names
  216.   --program-suffix=SUFFIX append SUFFIX to installed program names
  217.   --program-transform-name=PROGRAM
  218.                           run sed PROGRAM on installed program names
  219. EOF
  220.     cat << EOF
  221. Host type:
  222.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  223.   --host=HOST             configure for HOST [guessed]
  224.   --target=TARGET         configure for TARGET [TARGET=HOST]
  225. Features and packages:
  226.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  227.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  228.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  229.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  230.   --x-includes=DIR        X include files are in DIR
  231.   --x-libraries=DIR       X library files are in DIR
  232. EOF
  233.     if test -n "$ac_help"; then
  234.       echo "--enable and --with options recognized:$ac_help"
  235.     fi
  236.     exit 0 ;;
  237.  
  238.   -host | --host | --hos | --ho)
  239.     ac_prev=host ;;
  240.   -host=* | --host=* | --hos=* | --ho=*)
  241.     host="$ac_optarg" ;;
  242.  
  243.   -includedir | --includedir | --includedi | --included | --include \
  244.   | --includ | --inclu | --incl | --inc)
  245.     ac_prev=includedir ;;
  246.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  247.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  248.     includedir="$ac_optarg" ;;
  249.  
  250.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  251.     ac_prev=infodir ;;
  252.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  253.     infodir="$ac_optarg" ;;
  254.  
  255.   -libdir | --libdir | --libdi | --libd)
  256.     ac_prev=libdir ;;
  257.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  258.     libdir="$ac_optarg" ;;
  259.  
  260.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  261.   | --libexe | --libex | --libe)
  262.     ac_prev=libexecdir ;;
  263.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  264.   | --libexe=* | --libex=* | --libe=*)
  265.     libexecdir="$ac_optarg" ;;
  266.  
  267.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  268.   | --localstate | --localstat | --localsta | --localst \
  269.   | --locals | --local | --loca | --loc | --lo)
  270.     ac_prev=localstatedir ;;
  271.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  272.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  273.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  274.     localstatedir="$ac_optarg" ;;
  275.  
  276.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  277.     ac_prev=mandir ;;
  278.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  279.     mandir="$ac_optarg" ;;
  280.  
  281.   -nfp | --nfp | --nf)
  282.     # Obsolete; use --without-fp.
  283.     with_fp=no ;;
  284.  
  285.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  286.   | --no-cr | --no-c)
  287.     no_create=yes ;;
  288.  
  289.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  290.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  291.     no_recursion=yes ;;
  292.  
  293.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  294.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  295.   | --oldin | --oldi | --old | --ol | --o)
  296.     ac_prev=oldincludedir ;;
  297.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  298.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  299.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  300.     oldincludedir="$ac_optarg" ;;
  301.  
  302.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  303.     ac_prev=prefix ;;
  304.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  305.     prefix="$ac_optarg" ;;
  306.  
  307.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  308.   | --program-pre | --program-pr | --program-p)
  309.     ac_prev=program_prefix ;;
  310.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  311.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  312.     program_prefix="$ac_optarg" ;;
  313.  
  314.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  315.   | --program-suf | --program-su | --program-s)
  316.     ac_prev=program_suffix ;;
  317.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  318.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  319.     program_suffix="$ac_optarg" ;;
  320.  
  321.   -program-transform-name | --program-transform-name \
  322.   | --program-transform-nam | --program-transform-na \
  323.   | --program-transform-n | --program-transform- \
  324.   | --program-transform | --program-transfor \
  325.   | --program-transfo | --program-transf \
  326.   | --program-trans | --program-tran \
  327.   | --progr-tra | --program-tr | --program-t)
  328.     ac_prev=program_transform_name ;;
  329.   -program-transform-name=* | --program-transform-name=* \
  330.   | --program-transform-nam=* | --program-transform-na=* \
  331.   | --program-transform-n=* | --program-transform-=* \
  332.   | --program-transform=* | --program-transfor=* \
  333.   | --program-transfo=* | --program-transf=* \
  334.   | --program-trans=* | --program-tran=* \
  335.   | --progr-tra=* | --program-tr=* | --program-t=*)
  336.     program_transform_name="$ac_optarg" ;;
  337.  
  338.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  339.   | -silent | --silent | --silen | --sile | --sil)
  340.     silent=yes ;;
  341.  
  342.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  343.     ac_prev=sbindir ;;
  344.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  345.   | --sbi=* | --sb=*)
  346.     sbindir="$ac_optarg" ;;
  347.  
  348.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  349.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  350.   | --sharedst | --shareds | --shared | --share | --shar \
  351.   | --sha | --sh)
  352.     ac_prev=sharedstatedir ;;
  353.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  354.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  355.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  356.   | --sha=* | --sh=*)
  357.     sharedstatedir="$ac_optarg" ;;
  358.  
  359.   -site | --site | --sit)
  360.     ac_prev=site ;;
  361.   -site=* | --site=* | --sit=*)
  362.     site="$ac_optarg" ;;
  363.  
  364.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  365.     ac_prev=srcdir ;;
  366.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  367.     srcdir="$ac_optarg" ;;
  368.  
  369.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  370.   | --syscon | --sysco | --sysc | --sys | --sy)
  371.     ac_prev=sysconfdir ;;
  372.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  373.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  374.     sysconfdir="$ac_optarg" ;;
  375.  
  376.   -target | --target | --targe | --targ | --tar | --ta | --t)
  377.     ac_prev=target ;;
  378.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  379.     target="$ac_optarg" ;;
  380.  
  381.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  382.     verbose=yes ;;
  383.  
  384.   -version | --version | --versio | --versi | --vers)
  385.     echo "configure generated by autoconf version 2.7"
  386.     exit 0 ;;
  387.  
  388.   -with-* | --with-*)
  389.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  390.     # Reject names that are not valid shell variable names.
  391.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  392.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  393.     fi
  394.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  395.     case "$ac_option" in
  396.       *=*) ;;
  397.       *) ac_optarg=yes ;;
  398.     esac
  399.     eval "with_${ac_package}='$ac_optarg'" ;;
  400.  
  401.   -without-* | --without-*)
  402.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  403.     # Reject names that are not valid shell variable names.
  404.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  405.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  406.     fi
  407.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  408.     eval "with_${ac_package}=no" ;;
  409.  
  410.   --x)
  411.     # Obsolete; use --with-x.
  412.     with_x=yes ;;
  413.  
  414.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  415.   | --x-incl | --x-inc | --x-in | --x-i)
  416.     ac_prev=x_includes ;;
  417.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  418.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  419.     x_includes="$ac_optarg" ;;
  420.  
  421.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  422.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  423.     ac_prev=x_libraries ;;
  424.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  425.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  426.     x_libraries="$ac_optarg" ;;
  427.  
  428.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  429.     ;;
  430.  
  431.   *)
  432.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  433.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  434.     fi
  435.     if test "x$nonopt" != xNONE; then
  436.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  437.     fi
  438.     nonopt="$ac_option"
  439.     ;;
  440.  
  441.   esac
  442. done
  443.  
  444. if test -n "$ac_prev"; then
  445.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  446. fi
  447.  
  448. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  449.  
  450. # File descriptor usage:
  451. # 0 standard input
  452. # 1 file creation
  453. # 2 errors and warnings
  454. # 3 some systems may open it to /dev/tty
  455. # 4 used on the Kubota Titan
  456. # 6 checking for... messages and results
  457. # 5 compiler messages saved in config.log
  458. if test "$silent" = yes; then
  459.   exec 6>/dev/null
  460. else
  461.   exec 6>&1
  462. fi
  463. exec 5>./config.log
  464.  
  465. echo "\
  466. This file contains any messages produced by compilers while
  467. running configure, to aid debugging if configure makes a mistake.
  468. " 1>&5
  469.  
  470. # Strip out --no-create and --no-recursion so they do not pile up.
  471. # Also quote any args containing shell metacharacters.
  472. ac_configure_args=
  473. for ac_arg
  474. do
  475.   case "$ac_arg" in
  476.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  477.   | --no-cr | --no-c) ;;
  478.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  479.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  480.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  481.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  482.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  483.   esac
  484. done
  485.  
  486. # NLS nuisances.
  487. # Only set LANG and LC_ALL to C if already set.
  488. # These must not be set unconditionally because not all systems understand
  489. # e.g. LANG=C (notably SCO).
  490. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  491. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  492.  
  493. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  494. rm -rf conftest* confdefs.h
  495. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  496. echo > confdefs.h
  497.  
  498. # A filename unique to this package, relative to the directory that
  499. # configure is in, which we can look for to find out if srcdir is correct.
  500. ac_unique_file=create_vcs
  501.  
  502. # Find the source files, if location was not specified.
  503. if test -z "$srcdir"; then
  504.   ac_srcdir_defaulted=yes
  505.   # Try the directory containing this script, then its parent.
  506.   ac_prog=$0
  507.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  508.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  509.   srcdir=$ac_confdir
  510.   if test ! -r $srcdir/$ac_unique_file; then
  511.     srcdir=..
  512.   fi
  513. else
  514.   ac_srcdir_defaulted=no
  515. fi
  516. if test ! -r $srcdir/$ac_unique_file; then
  517.   if test "$ac_srcdir_defaulted" = yes; then
  518.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  519.   else
  520.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  521.   fi
  522. fi
  523. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  524.  
  525. # Prefer explicitly selected file to automatically selected ones.
  526. if test -z "$CONFIG_SITE"; then
  527.   if test "x$prefix" != xNONE; then
  528.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  529.   else
  530.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  531.   fi
  532. fi
  533. for ac_site_file in $CONFIG_SITE; do
  534.   if test -r "$ac_site_file"; then
  535.     echo "loading site script $ac_site_file"
  536.     . "$ac_site_file"
  537.   fi
  538. done
  539.  
  540. if test -r "$cache_file"; then
  541.   echo "loading cache $cache_file"
  542.   . $cache_file
  543. else
  544.   echo "creating cache $cache_file"
  545.   > $cache_file
  546. fi
  547.  
  548. ac_ext=c
  549. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  550. ac_cpp='echo $CPP $CPPFLAGS 1>&5;
  551. $CPP $CPPFLAGS'
  552. ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
  553. ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  554. ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
  555. ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  556.  
  557. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  558.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  559.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  560.     ac_n= ac_c='
  561. ' ac_t='    '
  562.   else
  563.     ac_n=-n ac_c= ac_t=
  564.   fi
  565. else
  566.   ac_n= ac_c='\c' ac_t=
  567. fi
  568.  
  569.  
  570.  
  571.  
  572. include_additional_path="/usr/local/include /opt/gnu/include"
  573.  
  574. use_cc_g_flag=yes
  575.  
  576. CCOPTS="$CFLAGS"
  577. unset CFLAGS
  578.  
  579. if test "x$prefix" = xNONE; then
  580. echo $ac_n "checking for prefix by ""... $ac_c" 1>&6
  581. # Extract the first word of "mc", so it can be a program name with args.
  582. set dummy mc; ac_word=$2
  583. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  584. if eval "test \"`echo '$''{'ac_cv_path_MC'+set}'`\" = set"; then
  585.   echo $ac_n "(cached) $ac_c" 1>&6
  586. else
  587.   case "$MC" in
  588.   /*)
  589.   ac_cv_path_MC="$MC" # Let the user override the test with a path.
  590.   ;;
  591.   *)
  592.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  593.   for ac_dir in $PATH; do
  594.     test -z "$ac_dir" && ac_dir=.
  595.     if test -f $ac_dir/$ac_word; then
  596.       ac_cv_path_MC="$ac_dir/$ac_word"
  597.       break
  598.     fi
  599.   done
  600.   IFS="$ac_save_ifs"
  601.   ;;
  602. esac
  603. fi
  604. MC="$ac_cv_path_MC"
  605. if test -n "$MC"; then
  606.   echo "$ac_t""$MC" 1>&6
  607. else
  608.   echo "$ac_t""no" 1>&6
  609. fi
  610.  
  611.   if test -n "$ac_cv_path_MC"; then
  612.     prefix=`echo $ac_cv_path_MC|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
  613.   fi
  614. fi
  615.  
  616.  
  617. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  618. set dummy ${MAKE-make}; ac_make=$2
  619. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  620.   echo $ac_n "(cached) $ac_c" 1>&6
  621. else
  622.   cat > conftestmake <<\EOF
  623. all:
  624.     @echo 'ac_maketemp="${MAKE}"'
  625. EOF
  626. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  627. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  628. if test -n "$ac_maketemp"; then
  629.   eval ac_cv_prog_make_${ac_make}_set=yes
  630. else
  631.   eval ac_cv_prog_make_${ac_make}_set=no
  632. fi
  633. rm -f conftestmake
  634. fi
  635. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  636.   echo "$ac_t""yes" 1>&6
  637.   SET_MAKE=
  638. else
  639.   echo "$ac_t""no" 1>&6
  640.   SET_MAKE="MAKE=${MAKE-make}"
  641. fi
  642.  
  643. # Extract the first word of "gcc", so it can be a program name with args.
  644. set dummy gcc; ac_word=$2
  645. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  646. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  647.   echo $ac_n "(cached) $ac_c" 1>&6
  648. else
  649.   if test -n "$CC"; then
  650.   ac_cv_prog_CC="$CC" # Let the user override the test.
  651. else
  652.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  653.   for ac_dir in $PATH; do
  654.     test -z "$ac_dir" && ac_dir=.
  655.     if test -f $ac_dir/$ac_word; then
  656.       ac_cv_prog_CC="gcc"
  657.       break
  658.     fi
  659.   done
  660.   IFS="$ac_save_ifs"
  661.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  662. fi
  663. fi
  664. CC="$ac_cv_prog_CC"
  665. if test -n "$CC"; then
  666.   echo "$ac_t""$CC" 1>&6
  667. else
  668.   echo "$ac_t""no" 1>&6
  669. fi
  670.  
  671.  
  672. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  673. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  674.   echo $ac_n "(cached) $ac_c" 1>&6
  675. else
  676.   cat > conftest.c <<EOF
  677. #ifdef __GNUC__
  678.   yes;
  679. #endif
  680. EOF
  681. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  682.   ac_cv_prog_gcc=yes
  683. else
  684.   ac_cv_prog_gcc=no
  685. fi
  686. fi
  687.  
  688. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  689. if test $ac_cv_prog_gcc = yes; then
  690.   GCC=yes
  691.   if test "${CFLAGS+set}" != set; then
  692.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  693. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  694.   echo $ac_n "(cached) $ac_c" 1>&6
  695. else
  696.   echo 'void f(){}' > conftest.c
  697. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  698.   ac_cv_prog_gcc_g=yes
  699. else
  700.   ac_cv_prog_gcc_g=no
  701. fi
  702. rm -f conftest*
  703.  
  704. fi
  705.  
  706. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  707.     if test $ac_cv_prog_gcc_g = yes; then
  708.       CFLAGS="-g -O"
  709.     else
  710.       CFLAGS="-O"
  711.     fi
  712.   fi
  713. else
  714.   GCC=
  715.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  716. fi
  717.  
  718. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  719. # On Suns, sometimes $CPP names a directory.
  720. if test -n "$CPP" && test -d "$CPP"; then
  721.   CPP=
  722. fi
  723. if test -z "$CPP"; then
  724. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  725.   echo $ac_n "(cached) $ac_c" 1>&6
  726. else
  727.     # This must be in double quotes, not single quotes, because CPP may get
  728.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  729.   CPP="${CC-cc} -E"
  730.   # On the NeXT, cc -E runs the code through the compiler's parser,
  731.   # not just through cpp.
  732.   cat > conftest.$ac_ext <<EOF
  733. #line 734 "configure"
  734. #include "confdefs.h"
  735. #include <assert.h>
  736. Syntax Error
  737. EOF
  738. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  739. ac_err=`grep -v '^ *+' conftest.out`
  740. if test -z "$ac_err"; then
  741.   :
  742. else
  743.   echo "$ac_err" >&5
  744.   rm -rf conftest*
  745.   CPP="${CC-cc} -E -traditional-cpp"
  746.   cat > conftest.$ac_ext <<EOF
  747. #line 748 "configure"
  748. #include "confdefs.h"
  749. #include <assert.h>
  750. Syntax Error
  751. EOF
  752. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  753. ac_err=`grep -v '^ *+' conftest.out`
  754. if test -z "$ac_err"; then
  755.   :
  756. else
  757.   echo "$ac_err" >&5
  758.   rm -rf conftest*
  759.   CPP=/lib/cpp
  760. fi
  761. rm -f conftest*
  762. fi
  763. rm -f conftest*
  764.   ac_cv_prog_CPP="$CPP"
  765. fi
  766.   CPP="$ac_cv_prog_CPP"
  767. else
  768.   ac_cv_prog_CPP="$CPP"
  769. fi
  770. echo "$ac_t""$CPP" 1>&6
  771.  
  772. # Extract the first word of "ranlib", so it can be a program name with args.
  773. set dummy ranlib; ac_word=$2
  774. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  775. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  776.   echo $ac_n "(cached) $ac_c" 1>&6
  777. else
  778.   if test -n "$RANLIB"; then
  779.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  780. else
  781.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  782.   for ac_dir in $PATH; do
  783.     test -z "$ac_dir" && ac_dir=.
  784.     if test -f $ac_dir/$ac_word; then
  785.       ac_cv_prog_RANLIB="ranlib"
  786.       break
  787.     fi
  788.   done
  789.   IFS="$ac_save_ifs"
  790.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  791. fi
  792. fi
  793. RANLIB="$ac_cv_prog_RANLIB"
  794. if test -n "$RANLIB"; then
  795.   echo "$ac_t""$RANLIB" 1>&6
  796. else
  797.   echo "$ac_t""no" 1>&6
  798. fi
  799.  
  800. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  801. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  802.   echo $ac_n "(cached) $ac_c" 1>&6
  803. else
  804.   rm -f conftestdata
  805. if ln -s X conftestdata 2>/dev/null
  806. then
  807.   rm -f conftestdata
  808.   ac_cv_prog_LN_S="ln -s"
  809. else
  810.   ac_cv_prog_LN_S=ln
  811. fi
  812. fi
  813. LN_S="$ac_cv_prog_LN_S"
  814. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  815.   echo "$ac_t""yes" 1>&6
  816. else
  817.   echo "$ac_t""no" 1>&6
  818. fi
  819.  
  820. for ac_prog in mawk gawk nawk awk
  821. do
  822. # Extract the first word of "$ac_prog", so it can be a program name with args.
  823. set dummy $ac_prog; ac_word=$2
  824. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  825. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  826.   echo $ac_n "(cached) $ac_c" 1>&6
  827. else
  828.   if test -n "$AWK"; then
  829.   ac_cv_prog_AWK="$AWK" # Let the user override the test.
  830. else
  831.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  832.   for ac_dir in $PATH; do
  833.     test -z "$ac_dir" && ac_dir=.
  834.     if test -f $ac_dir/$ac_word; then
  835.       ac_cv_prog_AWK="$ac_prog"
  836.       break
  837.     fi
  838.   done
  839.   IFS="$ac_save_ifs"
  840. fi
  841. fi
  842. AWK="$ac_cv_prog_AWK"
  843. if test -n "$AWK"; then
  844.   echo "$ac_t""$AWK" 1>&6
  845. else
  846.   echo "$ac_t""no" 1>&6
  847. fi
  848.  
  849. test -n "$AWK" && break
  850. done
  851.  
  852. if test x"$AWK" = x; then
  853.     AWK=":"
  854.     dep=slowdep
  855. else
  856.     dep=fastdep
  857. fi
  858.  
  859. echo $ac_n "checking whether we are using GNU make""... $ac_c" 1>&6
  860. set dummy ${MAKE-make}; ac_make=$2
  861. if eval "test \"`echo '$''{'ac_cv_prog_gnu_make'+set}'`\" = set"; then
  862.   echo $ac_n "(cached) $ac_c" 1>&6
  863. else
  864.   cat > conftestmake <<\EOF
  865. all:
  866.     @echo ' '
  867. EOF
  868. if ${MAKE-make} --version -f conftestmake 2>/dev/null | grep GNU >/dev/null 2>&1; then
  869.   ac_cv_prog_gnu_make=yes
  870. else
  871.   ac_cv_prog_gnu_make=no
  872. fi
  873. rm -f conftestmake
  874. fi
  875. if test $ac_cv_prog_gnu_make = yes; then
  876.   echo "$ac_t""yes" 1>&6
  877.   GNU_MAKE="GNU_MAKE=yes"
  878. else
  879.   echo "$ac_t""no" 1>&6
  880.   GNU_MAKE= 
  881. fi
  882.  
  883.  
  884. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  885. cat > conftest.$ac_ext <<EOF
  886. #line 887 "configure"
  887. #include "confdefs.h"
  888. #ifdef _AIX
  889.   yes
  890. #endif
  891.  
  892. EOF
  893. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  894.   egrep "yes" >/dev/null 2>&1; then
  895.   rm -rf conftest*
  896.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  897. #define _ALL_SOURCE 1
  898. EOF
  899.  
  900. else
  901.   rm -rf conftest*
  902.   echo "$ac_t""no" 1>&6
  903. fi
  904. rm -f conftest*
  905.  
  906.  
  907. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  908. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  909. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  910.   echo $ac_n "(cached) $ac_c" 1>&6
  911. else
  912.   cat > conftest.$ac_ext <<EOF
  913. #line 914 "configure"
  914. #include "confdefs.h"
  915. #include <minix/config.h>
  916. EOF
  917. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  918. ac_err=`grep -v '^ *+' conftest.out`
  919. if test -z "$ac_err"; then
  920.   rm -rf conftest*
  921.   eval "ac_cv_header_$ac_safe=yes"
  922. else
  923.   echo "$ac_err" >&5
  924.   rm -rf conftest*
  925.   eval "ac_cv_header_$ac_safe=no"
  926. fi
  927. rm -f conftest*
  928. fi
  929. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  930.   echo "$ac_t""yes" 1>&6
  931.   MINIX=yes
  932. else
  933.   echo "$ac_t""no" 1>&6
  934. MINIX=
  935. fi
  936.  
  937. if test "$MINIX" = yes; then
  938.   cat >> confdefs.h <<\EOF
  939. #define _POSIX_SOURCE 1
  940. EOF
  941.  
  942.   cat >> confdefs.h <<\EOF
  943. #define _POSIX_1_SOURCE 2
  944. EOF
  945.  
  946.   cat >> confdefs.h <<\EOF
  947. #define _MINIX 1
  948. EOF
  949.  
  950. fi
  951.  
  952. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  953. if test -d /etc/conf/kconfig.d &&
  954.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  955. then
  956.   echo "$ac_t""yes" 1>&6
  957.   ISC=yes # If later tests want to check for ISC.
  958.   cat >> confdefs.h <<\EOF
  959. #define _POSIX_SOURCE 1
  960. EOF
  961.  
  962.   if test "$GCC" = yes; then
  963.     CC="$CC -posix"
  964.   else
  965.     CC="$CC -Xp"
  966.   fi
  967. else
  968.   echo "$ac_t""no" 1>&6
  969.   ISC=
  970. fi
  971.  
  972. echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6
  973. if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
  974.   echo $ac_n "(cached) $ac_c" 1>&6
  975. else
  976.   cat > conftest.$ac_ext <<EOF
  977. #line 978 "configure"
  978. #include "confdefs.h"
  979. #include <sys/types.h>
  980. int main() { return 0; }
  981. int t() {
  982. return makedev(0, 0);
  983. ; return 0; }
  984. EOF
  985. if eval $ac_link; then
  986.   rm -rf conftest*
  987.   ac_cv_header_sys_types_h_makedev=yes
  988. else
  989.   rm -rf conftest*
  990.   ac_cv_header_sys_types_h_makedev=no
  991. fi
  992. rm -f conftest*
  993.  
  994.  
  995. fi
  996.  
  997. echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&6
  998.  
  999. if test $ac_cv_header_sys_types_h_makedev = no; then
  1000. ac_safe=`echo "sys/mkdev.h" | tr './\055' '___'`
  1001. echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6
  1002. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1003.   echo $ac_n "(cached) $ac_c" 1>&6
  1004. else
  1005.   cat > conftest.$ac_ext <<EOF
  1006. #line 1007 "configure"
  1007. #include "confdefs.h"
  1008. #include <sys/mkdev.h>
  1009. EOF
  1010. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1011. ac_err=`grep -v '^ *+' conftest.out`
  1012. if test -z "$ac_err"; then
  1013.   rm -rf conftest*
  1014.   eval "ac_cv_header_$ac_safe=yes"
  1015. else
  1016.   echo "$ac_err" >&5
  1017.   rm -rf conftest*
  1018.   eval "ac_cv_header_$ac_safe=no"
  1019. fi
  1020. rm -f conftest*
  1021. fi
  1022. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1023.   echo "$ac_t""yes" 1>&6
  1024.   cat >> confdefs.h <<\EOF
  1025. #define MAJOR_IN_MKDEV 1
  1026. EOF
  1027.  
  1028. else
  1029.   echo "$ac_t""no" 1>&6
  1030. fi
  1031.  
  1032.  
  1033.   if test $ac_cv_header_sys_mkdev_h = no; then
  1034. ac_safe=`echo "sys/sysmacros.h" | tr './\055' '___'`
  1035. echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
  1036. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1037.   echo $ac_n "(cached) $ac_c" 1>&6
  1038. else
  1039.   cat > conftest.$ac_ext <<EOF
  1040. #line 1041 "configure"
  1041. #include "confdefs.h"
  1042. #include <sys/sysmacros.h>
  1043. EOF
  1044. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1045. ac_err=`grep -v '^ *+' conftest.out`
  1046. if test -z "$ac_err"; then
  1047.   rm -rf conftest*
  1048.   eval "ac_cv_header_$ac_safe=yes"
  1049. else
  1050.   echo "$ac_err" >&5
  1051.   rm -rf conftest*
  1052.   eval "ac_cv_header_$ac_safe=no"
  1053. fi
  1054. rm -f conftest*
  1055. fi
  1056. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1057.   echo "$ac_t""yes" 1>&6
  1058.   cat >> confdefs.h <<\EOF
  1059. #define MAJOR_IN_SYSMACROS 1
  1060. EOF
  1061.  
  1062. else
  1063.   echo "$ac_t""no" 1>&6
  1064. fi
  1065.  
  1066.   fi
  1067. fi
  1068.  
  1069. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1070. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1071.   echo $ac_n "(cached) $ac_c" 1>&6
  1072. else
  1073.   cat > conftest.$ac_ext <<EOF
  1074. #line 1075 "configure"
  1075. #include "confdefs.h"
  1076.  
  1077. int main() { return 0; }
  1078. int t() {
  1079.  
  1080. /* Ultrix mips cc rejects this.  */
  1081. typedef int charset[2]; const charset x;
  1082. /* SunOS 4.1.1 cc rejects this.  */
  1083. char const *const *ccp;
  1084. char **p;
  1085. /* NEC SVR4.0.2 mips cc rejects this.  */
  1086. struct point {int x, y;};
  1087. static struct point const zero = {0,0};
  1088. /* AIX XL C 1.02.0.0 rejects this.
  1089.    It does not let you subtract one const X* pointer from another in an arm
  1090.    of an if-expression whose if-part is not a constant expression */
  1091. const char *g = "string";
  1092. ccp = &g + (g ? g-g : 0);
  1093. /* HPUX 7.0 cc rejects these. */
  1094. ++ccp;
  1095. p = (char**) ccp;
  1096. ccp = (char const *const *) p;
  1097. { /* SCO 3.2v4 cc rejects this.  */
  1098.   char *t;
  1099.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1100.  
  1101.   *t++ = 0;
  1102. }
  1103. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1104.   int x[] = {25, 17};
  1105.   const int *foo = &x[0];
  1106.   ++foo;
  1107. }
  1108. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1109.   typedef const int *iptr;
  1110.   iptr p = 0;
  1111.   ++p;
  1112. }
  1113. { /* AIX XL C 1.02.0.0 rejects this saying
  1114.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1115.   struct s { int j; const int *ap[3]; };
  1116.   struct s *b; b->j = 5;
  1117. }
  1118. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1119.   const int foo = 10;
  1120. }
  1121.  
  1122. ; return 0; }
  1123. EOF
  1124. if eval $ac_compile; then
  1125.   rm -rf conftest*
  1126.   ac_cv_c_const=yes
  1127. else
  1128.   rm -rf conftest*
  1129.   ac_cv_c_const=no
  1130. fi
  1131. rm -f conftest*
  1132.  
  1133. fi
  1134.  
  1135. echo "$ac_t""$ac_cv_c_const" 1>&6
  1136. if test $ac_cv_c_const = no; then
  1137.   cat >> confdefs.h <<\EOF
  1138. #define const 
  1139. EOF
  1140.  
  1141. fi
  1142.  
  1143. # Extract the first word of "mv", so it can be a program name with args.
  1144. set dummy mv; ac_word=$2
  1145. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1146. if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
  1147.   echo $ac_n "(cached) $ac_c" 1>&6
  1148. else
  1149.   case "$MV" in
  1150.   /*)
  1151.   ac_cv_path_MV="$MV" # Let the user override the test with a path.
  1152.   ;;
  1153.   *)
  1154.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1155.   for ac_dir in $PATH; do
  1156.     test -z "$ac_dir" && ac_dir=.
  1157.     if test -f $ac_dir/$ac_word; then
  1158.       ac_cv_path_MV="$ac_dir/$ac_word"
  1159.       break
  1160.     fi
  1161.   done
  1162.   IFS="$ac_save_ifs"
  1163.   test -z "$ac_cv_path_MV" && ac_cv_path_MV="mv"
  1164.   ;;
  1165. esac
  1166. fi
  1167. MV="$ac_cv_path_MV"
  1168. if test -n "$MV"; then
  1169.   echo "$ac_t""$MV" 1>&6
  1170. else
  1171.   echo "$ac_t""no" 1>&6
  1172. fi
  1173.  
  1174. # Extract the first word of "cp", so it can be a program name with args.
  1175. set dummy cp; ac_word=$2
  1176. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1177. if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then
  1178.   echo $ac_n "(cached) $ac_c" 1>&6
  1179. else
  1180.   case "$CP" in
  1181.   /*)
  1182.   ac_cv_path_CP="$CP" # Let the user override the test with a path.
  1183.   ;;
  1184.   *)
  1185.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1186.   for ac_dir in $PATH; do
  1187.     test -z "$ac_dir" && ac_dir=.
  1188.     if test -f $ac_dir/$ac_word; then
  1189.       ac_cv_path_CP="$ac_dir/$ac_word"
  1190.       break
  1191.     fi
  1192.   done
  1193.   IFS="$ac_save_ifs"
  1194.   test -z "$ac_cv_path_CP" && ac_cv_path_CP="cp"
  1195.   ;;
  1196. esac
  1197. fi
  1198. CP="$ac_cv_path_CP"
  1199. if test -n "$CP"; then
  1200.   echo "$ac_t""$CP" 1>&6
  1201. else
  1202.   echo "$ac_t""no" 1>&6
  1203. fi
  1204.  
  1205. # Extract the first word of "rm", so it can be a program name with args.
  1206. set dummy rm; ac_word=$2
  1207. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1208. if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
  1209.   echo $ac_n "(cached) $ac_c" 1>&6
  1210. else
  1211.   case "$RM" in
  1212.   /*)
  1213.   ac_cv_path_RM="$RM" # Let the user override the test with a path.
  1214.   ;;
  1215.   *)
  1216.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1217.   for ac_dir in $PATH; do
  1218.     test -z "$ac_dir" && ac_dir=.
  1219.     if test -f $ac_dir/$ac_word; then
  1220.       ac_cv_path_RM="$ac_dir/$ac_word"
  1221.       break
  1222.     fi
  1223.   done
  1224.   IFS="$ac_save_ifs"
  1225.   test -z "$ac_cv_path_RM" && ac_cv_path_RM="rm"
  1226.   ;;
  1227. esac
  1228. fi
  1229. RM="$ac_cv_path_RM"
  1230. if test -n "$RM"; then
  1231.   echo "$ac_t""$RM" 1>&6
  1232. else
  1233.   echo "$ac_t""no" 1>&6
  1234. fi
  1235.  
  1236. # Extract the first word of "chmod", so it can be a program name with args.
  1237. set dummy chmod; ac_word=$2
  1238. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1239. if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then
  1240.   echo $ac_n "(cached) $ac_c" 1>&6
  1241. else
  1242.   case "$CHMOD" in
  1243.   /*)
  1244.   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
  1245.   ;;
  1246.   *)
  1247.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1248.   for ac_dir in $PATH; do
  1249.     test -z "$ac_dir" && ac_dir=.
  1250.     if test -f $ac_dir/$ac_word; then
  1251.       ac_cv_path_CHMOD="$ac_dir/$ac_word"
  1252.       break
  1253.     fi
  1254.   done
  1255.   IFS="$ac_save_ifs"
  1256.   test -z "$ac_cv_path_CHMOD" && ac_cv_path_CHMOD=":"
  1257.   ;;
  1258. esac
  1259. fi
  1260. CHMOD="$ac_cv_path_CHMOD"
  1261. if test -n "$CHMOD"; then
  1262.   echo "$ac_t""$CHMOD" 1>&6
  1263. else
  1264.   echo "$ac_t""no" 1>&6
  1265. fi
  1266.  
  1267. # Extract the first word of "ar", so it can be a program name with args.
  1268. set dummy ar; ac_word=$2
  1269. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1270. if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
  1271.   echo $ac_n "(cached) $ac_c" 1>&6
  1272. else
  1273.   case "$AR" in
  1274.   /*)
  1275.   ac_cv_path_AR="$AR" # Let the user override the test with a path.
  1276.   ;;
  1277.   *)
  1278.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1279.   for ac_dir in $PATH; do
  1280.     test -z "$ac_dir" && ac_dir=.
  1281.     if test -f $ac_dir/$ac_word; then
  1282.       ac_cv_path_AR="$ac_dir/$ac_word"
  1283.       break
  1284.     fi
  1285.   done
  1286.   IFS="$ac_save_ifs"
  1287.   test -z "$ac_cv_path_AR" && ac_cv_path_AR="ar"
  1288.   ;;
  1289. esac
  1290. fi
  1291. AR="$ac_cv_path_AR"
  1292. if test -n "$AR"; then
  1293.   echo "$ac_t""$AR" 1>&6
  1294. else
  1295.   echo "$ac_t""no" 1>&6
  1296. fi
  1297.  
  1298. # If we cannot run a trivial program, we must be cross compiling.
  1299. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1300. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1301.   echo $ac_n "(cached) $ac_c" 1>&6
  1302. else
  1303.   if test "$cross_compiling" = yes; then
  1304.   ac_cv_c_cross=yes
  1305. else
  1306. cat > conftest.$ac_ext <<EOF
  1307. #line 1308 "configure"
  1308. #include "confdefs.h"
  1309. main(){return(0);}
  1310. EOF
  1311. eval $ac_link
  1312. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1313.   ac_cv_c_cross=no
  1314. else
  1315.   ac_cv_c_cross=yes
  1316. fi
  1317. fi
  1318. rm -fr conftest*
  1319. fi
  1320.  
  1321. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1322. cross_compiling=$ac_cv_c_cross
  1323.  
  1324.  
  1325. # Extract the first word of "uname", so it can be a program name with args.
  1326. set dummy uname; ac_word=$2
  1327. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1328. if eval "test \"`echo '$''{'ac_cv_prog_system'+set}'`\" = set"; then
  1329.   echo $ac_n "(cached) $ac_c" 1>&6
  1330. else
  1331.   if test -n "$system"; then
  1332.   ac_cv_prog_system="$system" # Let the user override the test.
  1333. else
  1334.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1335.   for ac_dir in $PATH; do
  1336.     test -z "$ac_dir" && ac_dir=.
  1337.     if test -f $ac_dir/$ac_word; then
  1338.       ac_cv_prog_system="`uname`"
  1339.       break
  1340.     fi
  1341.   done
  1342.   IFS="$ac_save_ifs"
  1343.   test -z "$ac_cv_prog_system" && ac_cv_prog_system="unknown"
  1344. fi
  1345. fi
  1346. system="$ac_cv_prog_system"
  1347. if test -n "$system"; then
  1348.   echo "$ac_t""$system" 1>&6
  1349. else
  1350.   echo "$ac_t""no" 1>&6
  1351. fi
  1352.  
  1353. for ac_prog in netscape arena Mosaic chimera
  1354. do
  1355. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1356. set dummy $ac_prog; ac_word=$2
  1357. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1358. if eval "test \"`echo '$''{'ac_cv_prog_X11_WWW'+set}'`\" = set"; then
  1359.   echo $ac_n "(cached) $ac_c" 1>&6
  1360. else
  1361.   if test -n "$X11_WWW"; then
  1362.   ac_cv_prog_X11_WWW="$X11_WWW" # Let the user override the test.
  1363. else
  1364.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1365.   for ac_dir in $PATH; do
  1366.     test -z "$ac_dir" && ac_dir=.
  1367.     if test -f $ac_dir/$ac_word; then
  1368.       ac_cv_prog_X11_WWW="$ac_prog"
  1369.       break
  1370.     fi
  1371.   done
  1372.   IFS="$ac_save_ifs"
  1373. fi
  1374. fi
  1375. X11_WWW="$ac_cv_prog_X11_WWW"
  1376. if test -n "$X11_WWW"; then
  1377.   echo "$ac_t""$X11_WWW" 1>&6
  1378. else
  1379.   echo "$ac_t""no" 1>&6
  1380. fi
  1381.  
  1382. test -n "$X11_WWW" && break
  1383. done
  1384.  
  1385.  
  1386. cc_uses_g=yes
  1387. if test x$GCC = xyes; then
  1388.     if test x$ac_cv_prog_gcc_g = xyes; then
  1389.     :
  1390.     else
  1391.     cc_uses_g=no
  1392.     fi
  1393. fi
  1394. if test "x$CCOPTS" = x; then
  1395.     if test x$GCC = xyes; then
  1396.         if test x$system = xLinux; then
  1397.             CCOPTS='-O2 -fno-strength-reduce'
  1398.         if test x$use_cc_g_flag = xyes; then
  1399.         if test $cc_uses_g = yes; then
  1400.             CCOPTS='-g -O'
  1401.         fi
  1402.         fi
  1403.     else
  1404.             CCOPTS='-O'
  1405.         if test x$use_cc_g_flag = xyes; then
  1406.         if test $cc_uses_g = yes; then
  1407.             CCOPTS='-g -O'
  1408.         fi
  1409.         fi
  1410.     fi
  1411.     else
  1412.     if test x$use_cc_g_flag = xyes; then
  1413.         CCOPTS="$CFLAGS"
  1414.     else
  1415.         CCOPTS=
  1416.     fi
  1417.     fi
  1418. fi
  1419. CFLAGS="$CCOPTS"
  1420.  
  1421.  
  1422. posix_libs=""
  1423. if test $system = A/UX
  1424. then
  1425.     posix_libs="-lposix"
  1426.     cat >> confdefs.h <<\EOF
  1427. #define _POSIX_SOURCE 1
  1428. EOF
  1429.  
  1430. fi
  1431.  
  1432. ac_aux_dir=
  1433. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  1434.   if test -f $ac_dir/install-sh; then
  1435.     ac_aux_dir=$ac_dir
  1436.     ac_install_sh="$ac_aux_dir/install-sh -c"
  1437.     break
  1438.   elif test -f $ac_dir/install.sh; then
  1439.     ac_aux_dir=$ac_dir
  1440.     ac_install_sh="$ac_aux_dir/install.sh -c"
  1441.     break
  1442.   fi
  1443. done
  1444. if test -z "$ac_aux_dir"; then
  1445.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  1446. fi
  1447. ac_config_guess=$ac_aux_dir/config.guess
  1448. ac_config_sub=$ac_aux_dir/config.sub
  1449. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  1450.  
  1451. # Find a good install program.  We prefer a C program (faster),
  1452. # so one script is as good as another.  But avoid the broken or
  1453. # incompatible versions:
  1454. # SysV /etc/install, /usr/sbin/install
  1455. # SunOS /usr/etc/install
  1456. # IRIX /sbin/install
  1457. # AIX /bin/install
  1458. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1459. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1460. # ./install, which can be erroneously created by make from ./install.sh.
  1461. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1462. if test -z "$INSTALL"; then
  1463. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  1464.   echo $ac_n "(cached) $ac_c" 1>&6
  1465. else
  1466.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1467.   for ac_dir in $PATH; do
  1468.     # Account for people who put trailing slashes in PATH elements.
  1469.     case "$ac_dir/" in
  1470.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1471.     *)
  1472.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1473.       for ac_prog in ginstall installbsd scoinst install; do
  1474.         if test -f $ac_dir/$ac_prog; then
  1475.       if test $ac_prog = install &&
  1476.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1477.         # AIX install.  It has an incompatible calling convention.
  1478.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1479.         :
  1480.       else
  1481.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  1482.         break 2
  1483.       fi
  1484.     fi
  1485.       done
  1486.       ;;
  1487.     esac
  1488.   done
  1489.   IFS="$ac_save_ifs"
  1490.  
  1491. fi
  1492.   if test "${ac_cv_path_install+set}" = set; then
  1493.     INSTALL="$ac_cv_path_install"
  1494.   else
  1495.     # As a last resort, use the slow shell script.  We don't cache a
  1496.     # path for INSTALL within a source directory, because that will
  1497.     # break other packages using the cache if that directory is
  1498.     # removed, or if the path is relative.
  1499.     INSTALL="$ac_install_sh"
  1500.   fi
  1501. fi
  1502. echo "$ac_t""$INSTALL" 1>&6
  1503.  
  1504. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1505. # It thinks the first close brace ends the variable substitution.
  1506. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1507.  
  1508. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1509.  
  1510. for ac_hdr in unistd.h string.h memory.h crypt.h grp.h limits.h
  1511. do
  1512. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1513. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1514. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1515.   echo $ac_n "(cached) $ac_c" 1>&6
  1516. else
  1517.   cat > conftest.$ac_ext <<EOF
  1518. #line 1519 "configure"
  1519. #include "confdefs.h"
  1520. #include <$ac_hdr>
  1521. EOF
  1522. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1523. ac_err=`grep -v '^ *+' conftest.out`
  1524. if test -z "$ac_err"; then
  1525.   rm -rf conftest*
  1526.   eval "ac_cv_header_$ac_safe=yes"
  1527. else
  1528.   echo "$ac_err" >&5
  1529.   rm -rf conftest*
  1530.   eval "ac_cv_header_$ac_safe=no"
  1531. fi
  1532. rm -f conftest*
  1533. fi
  1534. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1535.   echo "$ac_t""yes" 1>&6
  1536.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1537.   cat >> confdefs.h <<EOF
  1538. #define $ac_tr_hdr 1
  1539. EOF
  1540.  
  1541. else
  1542.   echo "$ac_t""no" 1>&6
  1543. fi
  1544. done
  1545.  
  1546. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  1547. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1548.   echo $ac_n "(cached) $ac_c" 1>&6
  1549. else
  1550.   cat > conftest.$ac_ext <<EOF
  1551. #line 1552 "configure"
  1552. #include "confdefs.h"
  1553. #include <sys/types.h>
  1554. #include <sys/wait.h>
  1555. #ifndef WEXITSTATUS
  1556. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  1557. #endif
  1558. #ifndef WIFEXITED
  1559. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1560. #endif
  1561. int main() { return 0; }
  1562. int t() {
  1563. int s;
  1564. wait (&s);
  1565. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1566. ; return 0; }
  1567. EOF
  1568. if eval $ac_compile; then
  1569.   rm -rf conftest*
  1570.   ac_cv_header_sys_wait_h=yes
  1571. else
  1572.   rm -rf conftest*
  1573.   ac_cv_header_sys_wait_h=no
  1574. fi
  1575. rm -f conftest*
  1576.  
  1577. fi
  1578.  
  1579. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  1580. if test $ac_cv_header_sys_wait_h = yes; then
  1581.   cat >> confdefs.h <<\EOF
  1582. #define HAVE_SYS_WAIT_H 1
  1583. EOF
  1584.  
  1585. fi
  1586.  
  1587. ac_header_dirent=no
  1588. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1589. do
  1590. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1591. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1592. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1593.   echo $ac_n "(cached) $ac_c" 1>&6
  1594. else
  1595.   cat > conftest.$ac_ext <<EOF
  1596. #line 1597 "configure"
  1597. #include "confdefs.h"
  1598. #include <sys/types.h>
  1599. #include <$ac_hdr>
  1600. int main() { return 0; }
  1601. int t() {
  1602. DIR *dirp = 0;
  1603. ; return 0; }
  1604. EOF
  1605. if eval $ac_compile; then
  1606.   rm -rf conftest*
  1607.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1608. else
  1609.   rm -rf conftest*
  1610.   eval "ac_cv_header_dirent_$ac_safe=no"
  1611. fi
  1612. rm -f conftest*
  1613.  
  1614. fi
  1615. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1616.   echo "$ac_t""yes" 1>&6
  1617.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
  1618.   cat >> confdefs.h <<EOF
  1619. #define $ac_tr_hdr 1
  1620. EOF
  1621.  ac_header_dirent=$ac_hdr; break
  1622. else
  1623.   echo "$ac_t""no" 1>&6
  1624. fi
  1625. done
  1626. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1627. if test $ac_header_dirent = dirent.h; then
  1628. echo $ac_n "checking for -ldir""... $ac_c" 1>&6
  1629. ac_lib_var=`echo dir | tr '.-/+' '___p'`
  1630. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1631.   echo $ac_n "(cached) $ac_c" 1>&6
  1632. else
  1633.   ac_save_LIBS="$LIBS"
  1634. LIBS="-ldir  $LIBS"
  1635. cat > conftest.$ac_ext <<EOF
  1636. #line 1637 "configure"
  1637. #include "confdefs.h"
  1638.  
  1639. int main() { return 0; }
  1640. int t() {
  1641. opendir()
  1642. ; return 0; }
  1643. EOF
  1644. if eval $ac_link; then
  1645.   rm -rf conftest*
  1646.   eval "ac_cv_lib_$ac_lib_var=yes"
  1647. else
  1648.   rm -rf conftest*
  1649.   eval "ac_cv_lib_$ac_lib_var=no"
  1650. fi
  1651. rm -f conftest*
  1652. LIBS="$ac_save_LIBS"
  1653.  
  1654. fi
  1655. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1656.   echo "$ac_t""yes" 1>&6
  1657.   LIBS="$LIBS -ldir"
  1658. else
  1659.   echo "$ac_t""no" 1>&6
  1660. fi
  1661.  
  1662. else
  1663. echo $ac_n "checking for -lx""... $ac_c" 1>&6
  1664. ac_lib_var=`echo x | tr '.-/+' '___p'`
  1665. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1666.   echo $ac_n "(cached) $ac_c" 1>&6
  1667. else
  1668.   ac_save_LIBS="$LIBS"
  1669. LIBS="-lx  $LIBS"
  1670. cat > conftest.$ac_ext <<EOF
  1671. #line 1672 "configure"
  1672. #include "confdefs.h"
  1673.  
  1674. int main() { return 0; }
  1675. int t() {
  1676. opendir()
  1677. ; return 0; }
  1678. EOF
  1679. if eval $ac_link; then
  1680.   rm -rf conftest*
  1681.   eval "ac_cv_lib_$ac_lib_var=yes"
  1682. else
  1683.   rm -rf conftest*
  1684.   eval "ac_cv_lib_$ac_lib_var=no"
  1685. fi
  1686. rm -f conftest*
  1687. LIBS="$ac_save_LIBS"
  1688.  
  1689. fi
  1690. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1691.   echo "$ac_t""yes" 1>&6
  1692.   LIBS="$LIBS -lx"
  1693. else
  1694.   echo "$ac_t""no" 1>&6
  1695. fi
  1696.  
  1697. fi
  1698.  
  1699.  
  1700. echo $ac_n "checking filename fits on dirent.d_name""... $ac_c" 1>&6
  1701. if eval "test \"`echo '$''{'ac_cv_dnamesize'+set}'`\" = set"; then
  1702.   echo $ac_n "(cached) $ac_c" 1>&6
  1703. else
  1704.   
  1705. OCFLAGS="$CFLAGS"
  1706. CFLAGS="$CFLAGS -I$srcdir"
  1707. if test "$cross_compiling" = yes; then
  1708.   
  1709. # Cannot find out, so assume no
  1710.     ac_cv_dnamesize="no"
  1711.  
  1712. else
  1713. cat > conftest.$ac_ext <<EOF
  1714. #line 1715 "configure"
  1715. #include "confdefs.h"
  1716.  
  1717. #include <src/fs.h>
  1718.  
  1719. main ()
  1720. {
  1721.    struct dirent ddd;
  1722.  
  1723.    if (sizeof (ddd.d_name) < 12)
  1724.     exit (0);
  1725.    else
  1726.        exit (1); 
  1727. }
  1728.  
  1729.  
  1730. EOF
  1731. eval $ac_link
  1732. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1733.   
  1734.     ac_cv_dnamesize="no"
  1735.  
  1736. else
  1737.   
  1738.     ac_cv_dnamesize="yes"
  1739.  
  1740. fi
  1741. fi
  1742. rm -fr conftest*
  1743. CFLAGS="$OCFLAGS"
  1744.  
  1745. fi
  1746.  
  1747. if test x$ac_cv_dnamesize = xno; then
  1748.     cat >> confdefs.h <<\EOF
  1749. #define NEED_EXTRA_DIRENT_BUFFER 1
  1750. EOF
  1751.  
  1752. fi
  1753. echo "$ac_t""$ac_cv_dnamesize" 1>&6
  1754.  
  1755. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1756. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1757.   echo $ac_n "(cached) $ac_c" 1>&6
  1758. else
  1759.   cat > conftest.$ac_ext <<EOF
  1760. #line 1761 "configure"
  1761. #include "confdefs.h"
  1762. #include <stdlib.h>
  1763. #include <stdarg.h>
  1764. #include <string.h>
  1765. #include <float.h>
  1766. EOF
  1767. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1768. ac_err=`grep -v '^ *+' conftest.out`
  1769. if test -z "$ac_err"; then
  1770.   rm -rf conftest*
  1771.   ac_cv_header_stdc=yes
  1772. else
  1773.   echo "$ac_err" >&5
  1774.   rm -rf conftest*
  1775.   ac_cv_header_stdc=no
  1776. fi
  1777. rm -f conftest*
  1778.  
  1779. if test $ac_cv_header_stdc = yes; then
  1780.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1781. cat > conftest.$ac_ext <<EOF
  1782. #line 1783 "configure"
  1783. #include "confdefs.h"
  1784. #include <string.h>
  1785. EOF
  1786. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1787.   egrep "memchr" >/dev/null 2>&1; then
  1788.   :
  1789. else
  1790.   rm -rf conftest*
  1791.   ac_cv_header_stdc=no
  1792. fi
  1793. rm -f conftest*
  1794.  
  1795. fi
  1796.  
  1797. if test $ac_cv_header_stdc = yes; then
  1798.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1799. cat > conftest.$ac_ext <<EOF
  1800. #line 1801 "configure"
  1801. #include "confdefs.h"
  1802. #include <stdlib.h>
  1803. EOF
  1804. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1805.   egrep "free" >/dev/null 2>&1; then
  1806.   :
  1807. else
  1808.   rm -rf conftest*
  1809.   ac_cv_header_stdc=no
  1810. fi
  1811. rm -f conftest*
  1812.  
  1813. fi
  1814.  
  1815. if test $ac_cv_header_stdc = yes; then
  1816.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1817. if test "$cross_compiling" = yes; then
  1818.   :
  1819. else
  1820. cat > conftest.$ac_ext <<EOF
  1821. #line 1822 "configure"
  1822. #include "confdefs.h"
  1823. #include <ctype.h>
  1824. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1825. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1826. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1827. int main () { int i; for (i = 0; i < 256; i++)
  1828. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1829. exit (0); }
  1830.  
  1831. EOF
  1832. eval $ac_link
  1833. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1834.   :
  1835. else
  1836.   ac_cv_header_stdc=no
  1837. fi
  1838. fi
  1839. rm -fr conftest*
  1840. fi
  1841. fi
  1842.  
  1843. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1844. if test $ac_cv_header_stdc = yes; then
  1845.   cat >> confdefs.h <<\EOF
  1846. #define STDC_HEADERS 1
  1847. EOF
  1848.  
  1849. fi
  1850.  
  1851.  
  1852.  
  1853. REGEX_O="regex.o"
  1854.  
  1855.  
  1856. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  1857. if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  1858.   echo $ac_n "(cached) $ac_c" 1>&6
  1859. else
  1860.   cat > conftest.$ac_ext <<EOF
  1861. #line 1862 "configure"
  1862. #include "confdefs.h"
  1863. #include <sys/types.h>
  1864. #include <sys/stat.h>
  1865. int main() { return 0; }
  1866. int t() {
  1867. struct stat s; s.st_blksize;
  1868. ; return 0; }
  1869. EOF
  1870. if eval $ac_compile; then
  1871.   rm -rf conftest*
  1872.   ac_cv_struct_st_blksize=yes
  1873. else
  1874.   rm -rf conftest*
  1875.   ac_cv_struct_st_blksize=no
  1876. fi
  1877. rm -f conftest*
  1878.  
  1879. fi
  1880.  
  1881. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  1882. if test $ac_cv_struct_st_blksize = yes; then
  1883.   cat >> confdefs.h <<\EOF
  1884. #define HAVE_ST_BLKSIZE 1
  1885. EOF
  1886.  
  1887. fi
  1888.  
  1889. echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
  1890. if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
  1891.   echo $ac_n "(cached) $ac_c" 1>&6
  1892. else
  1893.   cat > conftest.$ac_ext <<EOF
  1894. #line 1895 "configure"
  1895. #include "confdefs.h"
  1896. #include <sys/types.h>
  1897. #include <sys/stat.h>
  1898. int main() { return 0; }
  1899. int t() {
  1900. struct stat s; s.st_blocks;
  1901. ; return 0; }
  1902. EOF
  1903. if eval $ac_compile; then
  1904.   rm -rf conftest*
  1905.   ac_cv_struct_st_blocks=yes
  1906. else
  1907.   rm -rf conftest*
  1908.   ac_cv_struct_st_blocks=no
  1909. fi
  1910. rm -f conftest*
  1911.  
  1912. fi
  1913.  
  1914. echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
  1915. if test $ac_cv_struct_st_blocks = yes; then
  1916.   cat >> confdefs.h <<\EOF
  1917. #define HAVE_ST_BLOCKS 1
  1918. EOF
  1919.  
  1920. else
  1921.   LIBOBJS="$LIBOBJS fileblocks.o"
  1922. fi
  1923.  
  1924. echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
  1925. if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
  1926.   echo $ac_n "(cached) $ac_c" 1>&6
  1927. else
  1928.   cat > conftest.$ac_ext <<EOF
  1929. #line 1930 "configure"
  1930. #include "confdefs.h"
  1931. #include <sys/types.h>
  1932. #include <sys/stat.h>
  1933. int main() { return 0; }
  1934. int t() {
  1935. struct stat s; s.st_rdev;
  1936. ; return 0; }
  1937. EOF
  1938. if eval $ac_compile; then
  1939.   rm -rf conftest*
  1940.   ac_cv_struct_st_rdev=yes
  1941. else
  1942.   rm -rf conftest*
  1943.   ac_cv_struct_st_rdev=no
  1944. fi
  1945. rm -f conftest*
  1946.  
  1947. fi
  1948.  
  1949. echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
  1950. if test $ac_cv_struct_st_rdev = yes; then
  1951.   cat >> confdefs.h <<\EOF
  1952. #define HAVE_ST_RDEV 1
  1953. EOF
  1954.  
  1955. fi
  1956.  
  1957.  
  1958.  
  1959. for ac_func in strerror statfs getwd strcasecmp strncasecmp
  1960. do
  1961. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1962. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1963.   echo $ac_n "(cached) $ac_c" 1>&6
  1964. else
  1965.   cat > conftest.$ac_ext <<EOF
  1966. #line 1967 "configure"
  1967. #include "confdefs.h"
  1968. /* System header to define __stub macros and hopefully few prototypes,
  1969.     which can conflict with char $ac_func(); below.  */
  1970. #include <assert.h>
  1971. /* Override any gcc2 internal prototype to avoid an error.  */
  1972. char $ac_func();
  1973.  
  1974. int main() { return 0; }
  1975. int t() {
  1976.  
  1977. /* The GNU C library defines this for functions which it implements
  1978.     to always fail with ENOSYS.  Some functions are actually named
  1979.     something starting with __ and the normal name is an alias.  */
  1980. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1981. choke me
  1982. #else
  1983. $ac_func();
  1984. #endif
  1985.  
  1986. ; return 0; }
  1987. EOF
  1988. if eval $ac_link; then
  1989.   rm -rf conftest*
  1990.   eval "ac_cv_func_$ac_func=yes"
  1991. else
  1992.   rm -rf conftest*
  1993.   eval "ac_cv_func_$ac_func=no"
  1994. fi
  1995. rm -f conftest*
  1996.  
  1997. fi
  1998. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1999.   echo "$ac_t""yes" 1>&6
  2000.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2001.   cat >> confdefs.h <<EOF
  2002. #define $ac_tr_func 1
  2003. EOF
  2004.  
  2005. else
  2006.   echo "$ac_t""no" 1>&6
  2007. fi
  2008. done
  2009.  
  2010. for ac_func in strdup pwdauth cfgetospeed truncate initgroups
  2011. do
  2012. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2013. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2014.   echo $ac_n "(cached) $ac_c" 1>&6
  2015. else
  2016.   cat > conftest.$ac_ext <<EOF
  2017. #line 2018 "configure"
  2018. #include "confdefs.h"
  2019. /* System header to define __stub macros and hopefully few prototypes,
  2020.     which can conflict with char $ac_func(); below.  */
  2021. #include <assert.h>
  2022. /* Override any gcc2 internal prototype to avoid an error.  */
  2023. char $ac_func();
  2024.  
  2025. int main() { return 0; }
  2026. int t() {
  2027.  
  2028. /* The GNU C library defines this for functions which it implements
  2029.     to always fail with ENOSYS.  Some functions are actually named
  2030.     something starting with __ and the normal name is an alias.  */
  2031. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2032. choke me
  2033. #else
  2034. $ac_func();
  2035. #endif
  2036.  
  2037. ; return 0; }
  2038. EOF
  2039. if eval $ac_link; then
  2040.   rm -rf conftest*
  2041.   eval "ac_cv_func_$ac_func=yes"
  2042. else
  2043.   rm -rf conftest*
  2044.   eval "ac_cv_func_$ac_func=no"
  2045. fi
  2046. rm -f conftest*
  2047.  
  2048. fi
  2049. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2050.   echo "$ac_t""yes" 1>&6
  2051.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2052.   cat >> confdefs.h <<EOF
  2053. #define $ac_tr_func 1
  2054. EOF
  2055.  
  2056. else
  2057.   echo "$ac_t""no" 1>&6
  2058. fi
  2059. done
  2060.  
  2061.  
  2062. SHADOWLIB=
  2063. if test x$system = xLinux; then
  2064. echo $ac_n "checking for -lshadow""... $ac_c" 1>&6
  2065. ac_lib_var=`echo shadow | tr '.-/+' '___p'`
  2066. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2067.   echo $ac_n "(cached) $ac_c" 1>&6
  2068. else
  2069.   ac_save_LIBS="$LIBS"
  2070. LIBS="-lshadow  $LIBS"
  2071. cat > conftest.$ac_ext <<EOF
  2072. #line 2073 "configure"
  2073. #include "confdefs.h"
  2074.  
  2075. int main() { return 0; }
  2076. int t() {
  2077. pw_encrypt()
  2078. ; return 0; }
  2079. EOF
  2080. if eval $ac_link; then
  2081.   rm -rf conftest*
  2082.   eval "ac_cv_lib_$ac_lib_var=yes"
  2083. else
  2084.   rm -rf conftest*
  2085.   eval "ac_cv_lib_$ac_lib_var=no"
  2086. fi
  2087. rm -f conftest*
  2088. LIBS="$ac_save_LIBS"
  2089.  
  2090. fi
  2091. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2092.   echo "$ac_t""yes" 1>&6
  2093.   
  2094. shadow_header=no
  2095. for ac_hdr in shadow.h
  2096. do
  2097. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2098. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2099. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2100.   echo $ac_n "(cached) $ac_c" 1>&6
  2101. else
  2102.   cat > conftest.$ac_ext <<EOF
  2103. #line 2104 "configure"
  2104. #include "confdefs.h"
  2105. #include <$ac_hdr>
  2106. EOF
  2107. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2108. ac_err=`grep -v '^ *+' conftest.out`
  2109. if test -z "$ac_err"; then
  2110.   rm -rf conftest*
  2111.   eval "ac_cv_header_$ac_safe=yes"
  2112. else
  2113.   echo "$ac_err" >&5
  2114.   rm -rf conftest*
  2115.   eval "ac_cv_header_$ac_safe=no"
  2116. fi
  2117. rm -f conftest*
  2118. fi
  2119. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2120.   echo "$ac_t""yes" 1>&6
  2121.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  2122.   cat >> confdefs.h <<EOF
  2123. #define $ac_tr_hdr 1
  2124. EOF
  2125.  
  2126. else
  2127.   echo "$ac_t""no" 1>&6
  2128. fi
  2129. done
  2130.  
  2131. if test x$ac_cv_header_shadow_h = xyes; then
  2132.     shadow_header=yes
  2133. else
  2134. for ac_hdr in shadow/shadow.h
  2135. do
  2136. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2137. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2138. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2139.   echo $ac_n "(cached) $ac_c" 1>&6
  2140. else
  2141.   cat > conftest.$ac_ext <<EOF
  2142. #line 2143 "configure"
  2143. #include "confdefs.h"
  2144. #include <$ac_hdr>
  2145. EOF
  2146. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2147. ac_err=`grep -v '^ *+' conftest.out`
  2148. if test -z "$ac_err"; then
  2149.   rm -rf conftest*
  2150.   eval "ac_cv_header_$ac_safe=yes"
  2151. else
  2152.   echo "$ac_err" >&5
  2153.   rm -rf conftest*
  2154.   eval "ac_cv_header_$ac_safe=no"
  2155. fi
  2156. rm -f conftest*
  2157. fi
  2158. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2159.   echo "$ac_t""yes" 1>&6
  2160.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  2161.   cat >> confdefs.h <<EOF
  2162. #define $ac_tr_hdr 1
  2163. EOF
  2164.  
  2165. else
  2166.   echo "$ac_t""no" 1>&6
  2167. fi
  2168. done
  2169.  
  2170.     if test x$ac_cv_shadow_shadow_h = xyes; then
  2171.         shadow_header=yes
  2172.     fi
  2173. fi
  2174. if test $shadow_header = yes; then
  2175.     cat >> confdefs.h <<\EOF
  2176. #define LINUX_SHADOW 1
  2177. EOF
  2178.  
  2179.     SHADOWLIB=-lshadow
  2180. fi
  2181.  
  2182. else
  2183.   echo "$ac_t""no" 1>&6
  2184. fi
  2185.  
  2186. fi
  2187.  
  2188.  
  2189. NEED_CRYPT_PROTOTYPE=yes
  2190. if test x$ac_cv_header_crypt_h = xyes; then
  2191. cat > conftest.$ac_ext <<EOF
  2192. #line 2193 "configure"
  2193. #include "confdefs.h"
  2194. #include <crypt.h>
  2195. int main() { return 0; }
  2196. int t() {
  2197. char *p = crypt("xxx", "yyy");
  2198. ; return 0; }
  2199. EOF
  2200. ac_compile_warn='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1'
  2201. if { if eval $ac_compile_warn; then :; else echo arning; fi; } | grep arning 1>&5 2>&5; then
  2202.   :
  2203. else
  2204.   rm -rf conftest*
  2205.   
  2206. NEED_CRYPT_PROTOTYPE=no
  2207. fi
  2208. rm -f conftest*
  2209.  
  2210. else 
  2211.     if test x$ac_cv_header_unistd_h = xyes; then
  2212. cat > conftest.$ac_ext <<EOF
  2213. #line 2214 "configure"
  2214. #include "confdefs.h"
  2215. #include <unistd.h>
  2216. int main() { return 0; }
  2217. int t() {
  2218. char *p = crypt("xxx", "yyy");
  2219. ; return 0; }
  2220. EOF
  2221. ac_compile_warn='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1'
  2222. if { if eval $ac_compile_warn; then :; else echo arning; fi; } | grep arning 1>&5 2>&5; then
  2223.   :
  2224. else
  2225.   rm -rf conftest*
  2226.   
  2227. NEED_CRYPT_PROTOTYPE=no
  2228. fi
  2229. rm -f conftest*
  2230.  
  2231.     fi
  2232. fi
  2233. if test x$NEED_CRYPT_PROTOTYPE=xyes; then
  2234. cat >> confdefs.h <<\EOF
  2235. #define NEED_CRYPT_PROTOTYPE 1
  2236. EOF
  2237.  
  2238. fi
  2239.  
  2240. for ac_func in crypt
  2241. do
  2242. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2243. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2244.   echo $ac_n "(cached) $ac_c" 1>&6
  2245. else
  2246.   cat > conftest.$ac_ext <<EOF
  2247. #line 2248 "configure"
  2248. #include "confdefs.h"
  2249. /* System header to define __stub macros and hopefully few prototypes,
  2250.     which can conflict with char $ac_func(); below.  */
  2251. #include <assert.h>
  2252. /* Override any gcc2 internal prototype to avoid an error.  */
  2253. char $ac_func();
  2254.  
  2255. int main() { return 0; }
  2256. int t() {
  2257.  
  2258. /* The GNU C library defines this for functions which it implements
  2259.     to always fail with ENOSYS.  Some functions are actually named
  2260.     something starting with __ and the normal name is an alias.  */
  2261. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2262. choke me
  2263. #else
  2264. $ac_func();
  2265. #endif
  2266.  
  2267. ; return 0; }
  2268. EOF
  2269. if eval $ac_link; then
  2270.   rm -rf conftest*
  2271.   eval "ac_cv_func_$ac_func=yes"
  2272. else
  2273.   rm -rf conftest*
  2274.   eval "ac_cv_func_$ac_func=no"
  2275. fi
  2276. rm -f conftest*
  2277.  
  2278. fi
  2279. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2280.   echo "$ac_t""yes" 1>&6
  2281.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2282.   cat >> confdefs.h <<EOF
  2283. #define $ac_tr_func 1
  2284. EOF
  2285.  
  2286. else
  2287.   echo "$ac_t""no" 1>&6
  2288. echo $ac_n "checking for -lcrypt""... $ac_c" 1>&6
  2289. ac_lib_var=`echo crypt | tr '.-/+' '___p'`
  2290. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2291.   echo $ac_n "(cached) $ac_c" 1>&6
  2292. else
  2293.   ac_save_LIBS="$LIBS"
  2294. LIBS="-lcrypt  $LIBS"
  2295. cat > conftest.$ac_ext <<EOF
  2296. #line 2297 "configure"
  2297. #include "confdefs.h"
  2298.  
  2299. int main() { return 0; }
  2300. int t() {
  2301. crypt()
  2302. ; return 0; }
  2303. EOF
  2304. if eval $ac_link; then
  2305.   rm -rf conftest*
  2306.   eval "ac_cv_lib_$ac_lib_var=yes"
  2307. else
  2308.   rm -rf conftest*
  2309.   eval "ac_cv_lib_$ac_lib_var=no"
  2310. fi
  2311. rm -f conftest*
  2312. LIBS="$ac_save_LIBS"
  2313.  
  2314. fi
  2315. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2316.   echo "$ac_t""yes" 1>&6
  2317.   LIBS="$LIBS -lcrypt"
  2318. else
  2319.   echo "$ac_t""no" 1>&6
  2320.  
  2321.     echo $ac_n "checking for -lcrypt_i""... $ac_c" 1>&6
  2322. ac_lib_var=`echo crypt_i | tr '.-/+' '___p'`
  2323. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2324.   echo $ac_n "(cached) $ac_c" 1>&6
  2325. else
  2326.   ac_save_LIBS="$LIBS"
  2327. LIBS="-lcrypt_i  $LIBS"
  2328. cat > conftest.$ac_ext <<EOF
  2329. #line 2330 "configure"
  2330. #include "confdefs.h"
  2331.  
  2332. int main() { return 0; }
  2333. int t() {
  2334. crypt()
  2335. ; return 0; }
  2336. EOF
  2337. if eval $ac_link; then
  2338.   rm -rf conftest*
  2339.   eval "ac_cv_lib_$ac_lib_var=yes"
  2340. else
  2341.   rm -rf conftest*
  2342.   eval "ac_cv_lib_$ac_lib_var=no"
  2343. fi
  2344. rm -f conftest*
  2345. LIBS="$ac_save_LIBS"
  2346.  
  2347. fi
  2348. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2349.   echo "$ac_t""yes" 1>&6
  2350.   LIBS="$LIBS -lcrypt_i"
  2351. else
  2352.   echo "$ac_t""no" 1>&6
  2353. fi
  2354.  
  2355. fi
  2356.  
  2357. fi
  2358. done
  2359.  
  2360.  
  2361. for ac_func in grantpt
  2362. do
  2363. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2364. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2365.   echo $ac_n "(cached) $ac_c" 1>&6
  2366. else
  2367.   cat > conftest.$ac_ext <<EOF
  2368. #line 2369 "configure"
  2369. #include "confdefs.h"
  2370. /* System header to define __stub macros and hopefully few prototypes,
  2371.     which can conflict with char $ac_func(); below.  */
  2372. #include <assert.h>
  2373. /* Override any gcc2 internal prototype to avoid an error.  */
  2374. char $ac_func();
  2375.  
  2376. int main() { return 0; }
  2377. int t() {
  2378.  
  2379. /* The GNU C library defines this for functions which it implements
  2380.     to always fail with ENOSYS.  Some functions are actually named
  2381.     something starting with __ and the normal name is an alias.  */
  2382. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2383. choke me
  2384. #else
  2385. $ac_func();
  2386. #endif
  2387.  
  2388. ; return 0; }
  2389. EOF
  2390. if eval $ac_link; then
  2391.   rm -rf conftest*
  2392.   eval "ac_cv_func_$ac_func=yes"
  2393. else
  2394.   rm -rf conftest*
  2395.   eval "ac_cv_func_$ac_func=no"
  2396. fi
  2397. rm -f conftest*
  2398.  
  2399. fi
  2400. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2401.   echo "$ac_t""yes" 1>&6
  2402.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2403.   cat >> confdefs.h <<EOF
  2404. #define $ac_tr_func 1
  2405. EOF
  2406.  
  2407. else
  2408.   echo "$ac_t""no" 1>&6
  2409. fi
  2410. done
  2411.  
  2412. if test x$ac_cv_func_grantpt = xyes; then
  2413.     :
  2414. else
  2415.     echo $ac_n "checking for -lpt""... $ac_c" 1>&6
  2416. ac_lib_var=`echo pt | tr '.-/+' '___p'`
  2417. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2418.   echo $ac_n "(cached) $ac_c" 1>&6
  2419. else
  2420.   ac_save_LIBS="$LIBS"
  2421. LIBS="-lpt  $LIBS"
  2422. cat > conftest.$ac_ext <<EOF
  2423. #line 2424 "configure"
  2424. #include "confdefs.h"
  2425.  
  2426. int main() { return 0; }
  2427. int t() {
  2428. grantpt()
  2429. ; return 0; }
  2430. EOF
  2431. if eval $ac_link; then
  2432.   rm -rf conftest*
  2433.   eval "ac_cv_lib_$ac_lib_var=yes"
  2434. else
  2435.   rm -rf conftest*
  2436.   eval "ac_cv_lib_$ac_lib_var=no"
  2437. fi
  2438. rm -f conftest*
  2439. LIBS="$ac_save_LIBS"
  2440.  
  2441. fi
  2442. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2443.   echo "$ac_t""yes" 1>&6
  2444.     ac_tr_lib=HAVE_LIB`echo pt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2445.   cat >> confdefs.h <<EOF
  2446. #define $ac_tr_lib 1
  2447. EOF
  2448.  
  2449.   LIBS="-lpt $LIBS"
  2450.  
  2451. else
  2452.   echo "$ac_t""no" 1>&6
  2453. fi
  2454.  
  2455. fi
  2456.  
  2457. echo $ac_n "checking for AIX defines""... $ac_c" 1>&6
  2458. cat > conftest.$ac_ext <<EOF
  2459. #line 2460 "configure"
  2460. #include "confdefs.h"
  2461. #if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
  2462. yes
  2463. #endif
  2464.  
  2465. EOF
  2466. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2467.   egrep "yes" >/dev/null 2>&1; then
  2468.   rm -rf conftest*
  2469.   
  2470. cat >> confdefs.h <<\EOF
  2471. #define IS_AIX 1
  2472. EOF
  2473.  
  2474. echo "$ac_t""yes" 1>&6
  2475.  
  2476. else
  2477.   rm -rf conftest*
  2478.   echo "$ac_t""no" 1>&6
  2479. fi
  2480. rm -f conftest*
  2481.  
  2482.  
  2483. echo $ac_n "checking for -lgen""... $ac_c" 1>&6
  2484. ac_lib_var=`echo gen | tr '.-/+' '___p'`
  2485. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2486.   echo $ac_n "(cached) $ac_c" 1>&6
  2487. else
  2488.   ac_save_LIBS="$LIBS"
  2489. LIBS="-lgen  $LIBS"
  2490. cat > conftest.$ac_ext <<EOF
  2491. #line 2492 "configure"
  2492. #include "confdefs.h"
  2493.  
  2494. int main() { return 0; }
  2495. int t() {
  2496. getmntent()
  2497. ; return 0; }
  2498. EOF
  2499. if eval $ac_link; then
  2500.   rm -rf conftest*
  2501.   eval "ac_cv_lib_$ac_lib_var=yes"
  2502. else
  2503.   rm -rf conftest*
  2504.   eval "ac_cv_lib_$ac_lib_var=no"
  2505. fi
  2506. rm -f conftest*
  2507. LIBS="$ac_save_LIBS"
  2508.  
  2509. fi
  2510. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2511.   echo "$ac_t""yes" 1>&6
  2512.   LIBS="-lgen $LIBS"
  2513. else
  2514.   echo "$ac_t""no" 1>&6
  2515. fi
  2516.  
  2517.  
  2518.  
  2519.     for ac_hdr in fcntl.h sys/dustat.h sys/param.h sys/statfs.h sys/fstyp.h
  2520. do
  2521. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2522. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2523. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2524.   echo $ac_n "(cached) $ac_c" 1>&6
  2525. else
  2526.   cat > conftest.$ac_ext <<EOF
  2527. #line 2528 "configure"
  2528. #include "confdefs.h"
  2529. #include <$ac_hdr>
  2530. EOF
  2531. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2532. ac_err=`grep -v '^ *+' conftest.out`
  2533. if test -z "$ac_err"; then
  2534.   rm -rf conftest*
  2535.   eval "ac_cv_header_$ac_safe=yes"
  2536. else
  2537.   echo "$ac_err" >&5
  2538.   rm -rf conftest*
  2539.   eval "ac_cv_header_$ac_safe=no"
  2540. fi
  2541. rm -f conftest*
  2542. fi
  2543. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2544.   echo "$ac_t""yes" 1>&6
  2545.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  2546.   cat >> confdefs.h <<EOF
  2547. #define $ac_tr_hdr 1
  2548. EOF
  2549.  
  2550. else
  2551.   echo "$ac_t""no" 1>&6
  2552. fi
  2553. done
  2554.  
  2555.     for ac_hdr in mnttab.h mntent.h utime.h sys/statvfs.h sys/vfs.h
  2556. do
  2557. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2558. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2559. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2560.   echo $ac_n "(cached) $ac_c" 1>&6
  2561. else
  2562.   cat > conftest.$ac_ext <<EOF
  2563. #line 2564 "configure"
  2564. #include "confdefs.h"
  2565. #include <$ac_hdr>
  2566. EOF
  2567. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2568. ac_err=`grep -v '^ *+' conftest.out`
  2569. if test -z "$ac_err"; then
  2570.   rm -rf conftest*
  2571.   eval "ac_cv_header_$ac_safe=yes"
  2572. else
  2573.   echo "$ac_err" >&5
  2574.   rm -rf conftest*
  2575.   eval "ac_cv_header_$ac_safe=no"
  2576. fi
  2577. rm -f conftest*
  2578. fi
  2579. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2580.   echo "$ac_t""yes" 1>&6
  2581.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  2582.   cat >> confdefs.h <<EOF
  2583. #define $ac_tr_hdr 1
  2584. EOF
  2585.  
  2586. else
  2587.   echo "$ac_t""no" 1>&6
  2588. fi
  2589. done
  2590.  
  2591.     for ac_hdr in sys/mount.h sys/filsys.h sys/fs_types.h
  2592. do
  2593. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  2594. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2595. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2596.   echo $ac_n "(cached) $ac_c" 1>&6
  2597. else
  2598.   cat > conftest.$ac_ext <<EOF
  2599. #line 2600 "configure"
  2600. #include "confdefs.h"
  2601. #include <$ac_hdr>
  2602. EOF
  2603. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2604. ac_err=`grep -v '^ *+' conftest.out`
  2605. if test -z "$ac_err"; then
  2606.   rm -rf conftest*
  2607.   eval "ac_cv_header_$ac_safe=yes"
  2608. else
  2609.   echo "$ac_err" >&5
  2610.   rm -rf conftest*
  2611.   eval "ac_cv_header_$ac_safe=no"
  2612. fi
  2613. rm -f conftest*
  2614. fi
  2615. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2616.   echo "$ac_t""yes" 1>&6
  2617.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  2618.   cat >> confdefs.h <<EOF
  2619. #define $ac_tr_hdr 1
  2620. EOF
  2621.  
  2622. else
  2623.   echo "$ac_t""no" 1>&6
  2624. fi
  2625. done
  2626.  
  2627.     for ac_func in getmntinfo
  2628. do
  2629. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2630. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2631.   echo $ac_n "(cached) $ac_c" 1>&6
  2632. else
  2633.   cat > conftest.$ac_ext <<EOF
  2634. #line 2635 "configure"
  2635. #include "confdefs.h"
  2636. /* System header to define __stub macros and hopefully few prototypes,
  2637.     which can conflict with char $ac_func(); below.  */
  2638. #include <assert.h>
  2639. /* Override any gcc2 internal prototype to avoid an error.  */
  2640. char $ac_func();
  2641.  
  2642. int main() { return 0; }
  2643. int t() {
  2644.  
  2645. /* The GNU C library defines this for functions which it implements
  2646.     to always fail with ENOSYS.  Some functions are actually named
  2647.     something starting with __ and the normal name is an alias.  */
  2648. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2649. choke me
  2650. #else
  2651. $ac_func();
  2652. #endif
  2653.  
  2654. ; return 0; }
  2655. EOF
  2656. if eval $ac_link; then
  2657.   rm -rf conftest*
  2658.   eval "ac_cv_func_$ac_func=yes"
  2659. else
  2660.   rm -rf conftest*
  2661.   eval "ac_cv_func_$ac_func=no"
  2662. fi
  2663. rm -f conftest*
  2664.  
  2665. fi
  2666. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2667.   echo "$ac_t""yes" 1>&6
  2668.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2669.   cat >> confdefs.h <<EOF
  2670. #define $ac_tr_func 1
  2671. EOF
  2672.  
  2673. else
  2674.   echo "$ac_t""no" 1>&6
  2675. fi
  2676. done
  2677.  
  2678.  
  2679.         
  2680.     echo $ac_n "checking for d_ino member in directory struct""... $ac_c" 1>&6
  2681.     if eval "test \"`echo '$''{'fu_cv_sys_d_ino_in_dirent'+set}'`\" = set"; then
  2682.   echo $ac_n "(cached) $ac_c" 1>&6
  2683. else
  2684.   cat > conftest.$ac_ext <<EOF
  2685. #line 2686 "configure"
  2686. #include "confdefs.h"
  2687.  
  2688. #include <sys/types.h>
  2689. #ifdef HAVE_DIRENT_H
  2690. # include <dirent.h>
  2691. #else /* not HAVE_DIRENT_H */
  2692. # define dirent direct
  2693. # ifdef HAVE_SYS_NDIR_H
  2694. #  include <sys/ndir.h>
  2695. # endif /* HAVE_SYS_NDIR_H */
  2696. # ifdef HAVE_SYS_DIR_H
  2697. #  include <sys/dir.h>
  2698. # endif /* HAVE_SYS_DIR_H */
  2699. # ifdef HAVE_NDIR_H
  2700. #  include <ndir.h>
  2701. # endif /* HAVE_NDIR_H */
  2702. #endif /* HAVE_DIRENT_H */
  2703.     
  2704. int main() { return 0; }
  2705. int t() {
  2706. struct dirent dp; dp.d_ino = 0;
  2707. ; return 0; }
  2708. EOF
  2709. if eval $ac_link; then
  2710.   rm -rf conftest*
  2711.   fu_cv_sys_d_ino_in_dirent=yes
  2712. else
  2713.   rm -rf conftest*
  2714.   fu_cv_sys_d_ino_in_dirent=no
  2715. fi
  2716. rm -f conftest*
  2717.  
  2718. fi
  2719.  
  2720.     echo "$ac_t""$fu_cv_sys_d_ino_in_dirent" 1>&6
  2721.     if test $fu_cv_sys_d_ino_in_dirent = yes; then
  2722.       cat >> confdefs.h <<\EOF
  2723. #define D_INO_IN_DIRENT 1
  2724. EOF
  2725.  
  2726.     fi
  2727.  
  2728.     # Determine how to get the list of mounted filesystems.
  2729.     list_mounted_fs=
  2730.  
  2731.     # If the getmntent function is available but not in the standard library,
  2732.     # make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX).
  2733.     # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
  2734. echo $ac_n "checking for -lsun""... $ac_c" 1>&6
  2735. ac_lib_var=`echo sun | tr '.-/+' '___p'`
  2736. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2737.   echo $ac_n "(cached) $ac_c" 1>&6
  2738. else
  2739.   ac_save_LIBS="$LIBS"
  2740. LIBS="-lsun  $LIBS"
  2741. cat > conftest.$ac_ext <<EOF
  2742. #line 2743 "configure"
  2743. #include "confdefs.h"
  2744.  
  2745. int main() { return 0; }
  2746. int t() {
  2747. getmntent()
  2748. ; return 0; }
  2749. EOF
  2750. if eval $ac_link; then
  2751.   rm -rf conftest*
  2752.   eval "ac_cv_lib_$ac_lib_var=yes"
  2753. else
  2754.   rm -rf conftest*
  2755.   eval "ac_cv_lib_$ac_lib_var=no"
  2756. fi
  2757. rm -f conftest*
  2758. LIBS="$ac_save_LIBS"
  2759.  
  2760. fi
  2761. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2762.   echo "$ac_t""yes" 1>&6
  2763.   LIBS="-lsun $LIBS"
  2764. else
  2765.   echo "$ac_t""no" 1>&6
  2766. echo $ac_n "checking for -lseq""... $ac_c" 1>&6
  2767. ac_lib_var=`echo seq | tr '.-/+' '___p'`
  2768. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2769.   echo $ac_n "(cached) $ac_c" 1>&6
  2770. else
  2771.   ac_save_LIBS="$LIBS"
  2772. LIBS="-lseq  $LIBS"
  2773. cat > conftest.$ac_ext <<EOF
  2774. #line 2775 "configure"
  2775. #include "confdefs.h"
  2776.  
  2777. int main() { return 0; }
  2778. int t() {
  2779. getmntent()
  2780. ; return 0; }
  2781. EOF
  2782. if eval $ac_link; then
  2783.   rm -rf conftest*
  2784.   eval "ac_cv_lib_$ac_lib_var=yes"
  2785. else
  2786.   rm -rf conftest*
  2787.   eval "ac_cv_lib_$ac_lib_var=no"
  2788. fi
  2789. rm -f conftest*
  2790. LIBS="$ac_save_LIBS"
  2791.  
  2792. fi
  2793. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2794.   echo "$ac_t""yes" 1>&6
  2795.   LIBS="-lseq $LIBS"
  2796. else
  2797.   echo "$ac_t""no" 1>&6
  2798. echo $ac_n "checking for -lgen""... $ac_c" 1>&6
  2799. ac_lib_var=`echo gen | tr '.-/+' '___p'`
  2800. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2801.   echo $ac_n "(cached) $ac_c" 1>&6
  2802. else
  2803.   ac_save_LIBS="$LIBS"
  2804. LIBS="-lgen  $LIBS"
  2805. cat > conftest.$ac_ext <<EOF
  2806. #line 2807 "configure"
  2807. #include "confdefs.h"
  2808.  
  2809. int main() { return 0; }
  2810. int t() {
  2811. getmntent()
  2812. ; return 0; }
  2813. EOF
  2814. if eval $ac_link; then
  2815.   rm -rf conftest*
  2816.   eval "ac_cv_lib_$ac_lib_var=yes"
  2817. else
  2818.   rm -rf conftest*
  2819.   eval "ac_cv_lib_$ac_lib_var=no"
  2820. fi
  2821. rm -f conftest*
  2822. LIBS="$ac_save_LIBS"
  2823.  
  2824. fi
  2825. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2826.   echo "$ac_t""yes" 1>&6
  2827.   LIBS="-lgen $LIBS"
  2828. else
  2829.   echo "$ac_t""no" 1>&6
  2830. fi
  2831.  
  2832. fi
  2833.  
  2834. fi
  2835.  
  2836. echo $ac_n "checking for getmntent""... $ac_c" 1>&6
  2837. if eval "test \"`echo '$''{'ac_cv_func_getmntent'+set}'`\" = set"; then
  2838.   echo $ac_n "(cached) $ac_c" 1>&6
  2839. else
  2840.   cat > conftest.$ac_ext <<EOF
  2841. #line 2842 "configure"
  2842. #include "confdefs.h"
  2843. /* System header to define __stub macros and hopefully few prototypes,
  2844.     which can conflict with char getmntent(); below.  */
  2845. #include <assert.h>
  2846. /* Override any gcc2 internal prototype to avoid an error.  */
  2847. char getmntent();
  2848.  
  2849. int main() { return 0; }
  2850. int t() {
  2851.  
  2852. /* The GNU C library defines this for functions which it implements
  2853.     to always fail with ENOSYS.  Some functions are actually named
  2854.     something starting with __ and the normal name is an alias.  */
  2855. #if defined (__stub_getmntent) || defined (__stub___getmntent)
  2856. choke me
  2857. #else
  2858. getmntent();
  2859. #endif
  2860.  
  2861. ; return 0; }
  2862. EOF
  2863. if eval $ac_link; then
  2864.   rm -rf conftest*
  2865.   eval "ac_cv_func_getmntent=yes"
  2866. else
  2867.   rm -rf conftest*
  2868.   eval "ac_cv_func_getmntent=no"
  2869. fi
  2870. rm -f conftest*
  2871.  
  2872. fi
  2873. if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
  2874.   echo "$ac_t""yes" 1>&6
  2875.   cat >> confdefs.h <<\EOF
  2876. #define HAVE_GETMNTENT 1
  2877. EOF
  2878.  
  2879. else
  2880.   echo "$ac_t""no" 1>&6
  2881. fi
  2882.  
  2883.  
  2884.     if test $ac_cv_func_getmntent = yes; then
  2885.  
  2886.       # This system has the getmntent function.
  2887.       # Determine whether it's the one-argument variant or the two-argument one.
  2888.  
  2889.       if test -z "$list_mounted_fs"; then
  2890.     # 4.3BSD, SunOS, HP-UX, Dynix, Irix
  2891.     echo $ac_n "checking for one-argument getmntent function""... $ac_c" 1>&6
  2892.     if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent1'+set}'`\" = set"; then
  2893.   echo $ac_n "(cached) $ac_c" 1>&6
  2894. else
  2895.   test $ac_cv_header_mntent_h = yes \
  2896.                && fu_cv_sys_mounted_getmntent1=yes \
  2897.                || fu_cv_sys_mounted_getmntent1=no
  2898. fi
  2899.  
  2900.     echo "$ac_t""$fu_cv_sys_mounted_getmntent1" 1>&6
  2901.     if test $fu_cv_sys_mounted_getmntent1 = yes; then
  2902.       list_mounted_fs=found
  2903.       cat >> confdefs.h <<\EOF
  2904. #define MOUNTED_GETMNTENT1 1
  2905. EOF
  2906.  
  2907.     fi
  2908.       fi
  2909.  
  2910.       if test -z "$list_mounted_fs"; then
  2911.     # SVR4
  2912.     echo $ac_n "checking for two-argument getmntent function""... $ac_c" 1>&6
  2913.     if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent2'+set}'`\" = set"; then
  2914.   echo $ac_n "(cached) $ac_c" 1>&6
  2915. else
  2916.   cat > conftest.$ac_ext <<EOF
  2917. #line 2918 "configure"
  2918. #include "confdefs.h"
  2919. #include <sys/mnttab.h>
  2920. EOF
  2921. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2922.   egrep "getmntent" >/dev/null 2>&1; then
  2923.   rm -rf conftest*
  2924.   fu_cv_sys_mounted_getmntent2=yes
  2925. else
  2926.   rm -rf conftest*
  2927.   fu_cv_sys_mounted_getmntent2=no
  2928. fi
  2929. rm -f conftest*
  2930.  
  2931. fi
  2932.  
  2933.     echo "$ac_t""$fu_cv_sys_mounted_getmntent2" 1>&6
  2934.     if test $fu_cv_sys_mounted_getmntent2 = yes; then
  2935.       list_mounted_fs=found
  2936.       cat >> confdefs.h <<\EOF
  2937. #define MOUNTED_GETMNTENT2 1
  2938. EOF
  2939.  
  2940.     fi
  2941.       fi
  2942.  
  2943.       if test -z "$list_mounted_fs"; then
  2944.     echo "configure: warning: could not determine how to read list of mounted fs" 1>&2
  2945.     CPPFLAGS="$CPPFLAGS -DNO_INFOMOUNT"
  2946.       fi
  2947.  
  2948.     fi
  2949.  
  2950.     if test -z "$list_mounted_fs"; then
  2951.       # DEC Alpha running OSF/1.
  2952.       echo $ac_n "checking for getfsstat function""... $ac_c" 1>&6
  2953.       if eval "test \"`echo '$''{'fu_cv_sys_mounted_getsstat'+set}'`\" = set"; then
  2954.   echo $ac_n "(cached) $ac_c" 1>&6
  2955. else
  2956.   cat > conftest.$ac_ext <<EOF
  2957. #line 2958 "configure"
  2958. #include "confdefs.h"
  2959.  
  2960. #include <sys/types.h>
  2961. #include <sys/mount.h>
  2962. #include <sys/fs_types.h>
  2963. int main() { return 0; }
  2964. int t() {
  2965. struct statfs *stats;
  2966.       numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); 
  2967. ; return 0; }
  2968. EOF
  2969. if eval $ac_link; then
  2970.   rm -rf conftest*
  2971.   fu_cv_sys_mounted_getsstat=yes
  2972. else
  2973.   rm -rf conftest*
  2974.   fu_cv_sys_mounted_getsstat=no
  2975. fi
  2976. rm -f conftest*
  2977.  
  2978. fi
  2979.  
  2980.       echo "$ac_t""$fu_cv_sys_mounted_getsstat" 1>&6
  2981.       if test $fu_cv_sys_mounted_getsstat = yes; then
  2982.     list_mounted_fs=found
  2983.     cat >> confdefs.h <<\EOF
  2984. #define MOUNTED_GETFSSTAT 1
  2985. EOF
  2986.  
  2987.       fi
  2988.     fi
  2989.  
  2990.     if test -z "$list_mounted_fs"; then
  2991.       # AIX.
  2992.       echo $ac_n "checking for mntctl function and struct vmount""... $ac_c" 1>&6
  2993.       if eval "test \"`echo '$''{'fu_cv_sys_mounted_vmount'+set}'`\" = set"; then
  2994.   echo $ac_n "(cached) $ac_c" 1>&6
  2995. else
  2996.   cat > conftest.$ac_ext <<EOF
  2997. #line 2998 "configure"
  2998. #include "confdefs.h"
  2999. #include <fshelp.h>
  3000. EOF
  3001. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3002. ac_err=`grep -v '^ *+' conftest.out`
  3003. if test -z "$ac_err"; then
  3004.   rm -rf conftest*
  3005.   fu_cv_sys_mounted_vmount=yes
  3006. else
  3007.   echo "$ac_err" >&5
  3008.   rm -rf conftest*
  3009.   fu_cv_sys_mounted_vmount=no
  3010. fi
  3011. rm -f conftest*
  3012. fi
  3013.  
  3014.       echo "$ac_t""$fu_cv_sys_mounted_vmount" 1>&6
  3015.       if test $fu_cv_sys_mounted_vmount = yes; then
  3016.     list_mounted_fs=found
  3017.     cat >> confdefs.h <<\EOF
  3018. #define MOUNTED_VMOUNT 1
  3019. EOF
  3020.  
  3021.       fi
  3022.     fi
  3023.  
  3024.     if test -z "$list_mounted_fs"; then
  3025.       # SVR3
  3026.       echo $ac_n "checking for existence of three headers""... $ac_c" 1>&6
  3027.       if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread_fstyp'+set}'`\" = set"; then
  3028.   echo $ac_n "(cached) $ac_c" 1>&6
  3029. else
  3030.   cat > conftest.$ac_ext <<EOF
  3031. #line 3032 "configure"
  3032. #include "confdefs.h"
  3033.  
  3034. #include <sys/statfs.h>
  3035. #include <sys/fstyp.h>
  3036. #include <mnttab.h>
  3037. EOF
  3038. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3039. ac_err=`grep -v '^ *+' conftest.out`
  3040. if test -z "$ac_err"; then
  3041.   rm -rf conftest*
  3042.   fu_cv_sys_mounted_fread_fstyp=yes
  3043. else
  3044.   echo "$ac_err" >&5
  3045.   rm -rf conftest*
  3046.   fu_cv_sys_mounted_fread_fstyp=no
  3047. fi
  3048. rm -f conftest*
  3049. fi
  3050.  
  3051.       echo "$ac_t""$fu_cv_sys_mounted_fread_fstyp" 1>&6
  3052.       if test $fu_cv_sys_mounted_fread_fstyp = yes; then
  3053.     list_mounted_fs=found
  3054.     cat >> confdefs.h <<\EOF
  3055. #define MOUNTED_FREAD_FSTYP 1
  3056. EOF
  3057.  
  3058.       fi
  3059.     fi
  3060.  
  3061.     if test -z "$list_mounted_fs"; then
  3062.       # 4.4BSD and DEC OSF/1.
  3063.       echo $ac_n "checking for getmntinfo function""... $ac_c" 1>&6
  3064.       if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntinfo'+set}'`\" = set"; then
  3065.   echo $ac_n "(cached) $ac_c" 1>&6
  3066. else
  3067.   
  3068.       ok=
  3069.       if test $ac_cv_func_getmntinfo = yes; then
  3070.         cat > conftest.$ac_ext <<EOF
  3071. #line 3072 "configure"
  3072. #include "confdefs.h"
  3073. #include <sys/mount.h>
  3074. EOF
  3075. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3076.   egrep "f_type;" >/dev/null 2>&1; then
  3077.   rm -rf conftest*
  3078.   ok=yes
  3079. fi
  3080. rm -f conftest*
  3081.  
  3082.       fi
  3083.       test -n "$ok" \
  3084.           && fu_cv_sys_mounted_getmntinfo=yes \
  3085.           || fu_cv_sys_mounted_getmntinfo=no
  3086.     
  3087. fi
  3088.  
  3089.       echo "$ac_t""$fu_cv_sys_mounted_getmntinfo" 1>&6
  3090.       if test $fu_cv_sys_mounted_getmntinfo = yes; then
  3091.     list_mounted_fs=found
  3092.     cat >> confdefs.h <<\EOF
  3093. #define MOUNTED_GETMNTINFO 1
  3094. EOF
  3095.  
  3096.       fi
  3097.     fi
  3098.  
  3099.     # FIXME: add a test for netbsd-1.1 here
  3100.  
  3101.     if test -z "$list_mounted_fs"; then
  3102.       # Ultrix
  3103.       echo $ac_n "checking for getmnt function""... $ac_c" 1>&6
  3104.       if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmnt'+set}'`\" = set"; then
  3105.   echo $ac_n "(cached) $ac_c" 1>&6
  3106. else
  3107.   cat > conftest.$ac_ext <<EOF
  3108. #line 3109 "configure"
  3109. #include "confdefs.h"
  3110.  
  3111. #include <sys/fs_types.h>
  3112. #include <sys/mount.h>
  3113. EOF
  3114. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3115. ac_err=`grep -v '^ *+' conftest.out`
  3116. if test -z "$ac_err"; then
  3117.   rm -rf conftest*
  3118.   fu_cv_sys_mounted_getmnt=yes
  3119. else
  3120.   echo "$ac_err" >&5
  3121.   rm -rf conftest*
  3122.   fu_cv_sys_mounted_getmnt=no
  3123. fi
  3124. rm -f conftest*
  3125. fi
  3126.  
  3127.       echo "$ac_t""$fu_cv_sys_mounted_getmnt" 1>&6
  3128.       if test $fu_cv_sys_mounted_getmnt = yes; then
  3129.     list_mounted_fs=found
  3130.     cat >> confdefs.h <<\EOF
  3131. #define MOUNTED_GETMNT 1
  3132. EOF
  3133.  
  3134.       fi
  3135.     fi
  3136.  
  3137.     if test -z "$list_mounted_fs"; then
  3138.       # SVR2
  3139.     echo $ac_n "checking whether it is possible to resort to fread on /etc/mnttab""... $ac_c" 1>&6
  3140.       if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread'+set}'`\" = set"; then
  3141.   echo $ac_n "(cached) $ac_c" 1>&6
  3142. else
  3143.   cat > conftest.$ac_ext <<EOF
  3144. #line 3145 "configure"
  3145. #include "confdefs.h"
  3146. #include <mnttab.h>
  3147. EOF
  3148. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3149. ac_err=`grep -v '^ *+' conftest.out`
  3150. if test -z "$ac_err"; then
  3151.   rm -rf conftest*
  3152.   fu_cv_sys_mounted_fread=yes
  3153. else
  3154.   echo "$ac_err" >&5
  3155.   rm -rf conftest*
  3156.   fu_cv_sys_mounted_fread=no
  3157. fi
  3158. rm -f conftest*
  3159. fi
  3160.  
  3161.       echo "$ac_t""$fu_cv_sys_mounted_fread" 1>&6
  3162.       if test $fu_cv_sys_mounted_fread = yes; then
  3163.     list_mounted_fs=found
  3164.     cat >> confdefs.h <<\EOF
  3165. #define MOUNTED_FREAD 1
  3166. EOF
  3167.  
  3168.       fi
  3169.     fi
  3170.  
  3171.     if test -z "$list_mounted_fs"; then
  3172.       echo "configure: warning: could not determine how to read list of mounted fs" 1>&2
  3173.       CPPFLAGS="$CPPFLAGS -DNO_INFOMOUNT"
  3174.       # FIXME -- no need to abort building the whole package
  3175.       # Can't build mountlist.c or anything that needs its functions
  3176.     fi
  3177.  
  3178.  
  3179.     echo "checking how to get filesystem space usage" 1>&6
  3180.     space=no
  3181.  
  3182.     # Here we'll compromise a little (and perform only the link test)
  3183.     # since it seems there are no variants of the statvfs function.
  3184.     if test $space = no; then
  3185.       # SVR4
  3186.       for ac_func in statvfs
  3187. do
  3188. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3189. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3190.   echo $ac_n "(cached) $ac_c" 1>&6
  3191. else
  3192.   cat > conftest.$ac_ext <<EOF
  3193. #line 3194 "configure"
  3194. #include "confdefs.h"
  3195. /* System header to define __stub macros and hopefully few prototypes,
  3196.     which can conflict with char $ac_func(); below.  */
  3197. #include <assert.h>
  3198. /* Override any gcc2 internal prototype to avoid an error.  */
  3199. char $ac_func();
  3200.  
  3201. int main() { return 0; }
  3202. int t() {
  3203.  
  3204. /* The GNU C library defines this for functions which it implements
  3205.     to always fail with ENOSYS.  Some functions are actually named
  3206.     something starting with __ and the normal name is an alias.  */
  3207. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3208. choke me
  3209. #else
  3210. $ac_func();
  3211. #endif
  3212.  
  3213. ; return 0; }
  3214. EOF
  3215. if eval $ac_link; then
  3216.   rm -rf conftest*
  3217.   eval "ac_cv_func_$ac_func=yes"
  3218. else
  3219.   rm -rf conftest*
  3220.   eval "ac_cv_func_$ac_func=no"
  3221. fi
  3222. rm -f conftest*
  3223.  
  3224. fi
  3225. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3226.   echo "$ac_t""yes" 1>&6
  3227.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3228.   cat >> confdefs.h <<EOF
  3229. #define $ac_tr_func 1
  3230. EOF
  3231.  
  3232. else
  3233.   echo "$ac_t""no" 1>&6
  3234. fi
  3235. done
  3236.  
  3237.       if test $ac_cv_func_statvfs = yes; then
  3238.     space=yes
  3239.     cat >> confdefs.h <<\EOF
  3240. #define STAT_STATVFS 1
  3241. EOF
  3242.  
  3243.       fi
  3244.     fi
  3245.  
  3246.     if test $space = no; then
  3247.       # DEC Alpha running OSF/1
  3248.       echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
  3249.       if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
  3250.   echo $ac_n "(cached) $ac_c" 1>&6
  3251. else
  3252.   if test "$cross_compiling" = yes; then
  3253.   fu_cv_sys_stat_statfs3_osf1=no
  3254. else
  3255. cat > conftest.$ac_ext <<EOF
  3256. #line 3257 "configure"
  3257. #include "confdefs.h"
  3258.  
  3259. #include <sys/param.h>
  3260. #include <sys/types.h>
  3261. #include <sys/mount.h>
  3262.       main ()
  3263.       {
  3264.     struct statfs fsd;
  3265.     fsd.f_fsize = 0;
  3266.     exit (statfs (".", &fsd, sizeof (struct statfs)));
  3267.       }
  3268. EOF
  3269. eval $ac_link
  3270. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3271.   fu_cv_sys_stat_statfs3_osf1=yes
  3272. else
  3273.   fu_cv_sys_stat_statfs3_osf1=no
  3274. fi
  3275. fi
  3276. rm -fr conftest*
  3277. fi
  3278.  
  3279.       echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
  3280.       if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
  3281.     space=yes
  3282.     cat >> confdefs.h <<\EOF
  3283. #define STAT_STATFS3_OSF1 1
  3284. EOF
  3285.  
  3286.       fi
  3287.     fi
  3288.  
  3289.     if test $space = no; then
  3290.     # AIX
  3291.       echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
  3292.       if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
  3293.   echo $ac_n "(cached) $ac_c" 1>&6
  3294. else
  3295.   if test "$cross_compiling" = yes; then
  3296.   fu_cv_sys_stat_statfs2_bsize=no
  3297. else
  3298. cat > conftest.$ac_ext <<EOF
  3299. #line 3300 "configure"
  3300. #include "confdefs.h"
  3301.  
  3302. #ifdef HAVE_SYS_PARAM_H
  3303. #include <sys/param.h>
  3304. #endif
  3305. #ifdef HAVE_SYS_MOUNT_H
  3306. #include <sys/mount.h>
  3307. #endif
  3308. #ifdef HAVE_SYS_VFS_H
  3309. #include <sys/vfs.h>
  3310. #endif
  3311.       main ()
  3312.       {
  3313.       struct statfs fsd;
  3314.       fsd.f_bsize = 0;
  3315.       exit (statfs (".", &fsd));
  3316.       }
  3317. EOF
  3318. eval $ac_link
  3319. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3320.   fu_cv_sys_stat_statfs2_bsize=yes
  3321. else
  3322.   fu_cv_sys_stat_statfs2_bsize=no
  3323. fi
  3324. fi
  3325. rm -fr conftest*
  3326. fi
  3327.  
  3328.       echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
  3329.       if test $fu_cv_sys_stat_statfs2_bsize = yes; then
  3330.     space=yes
  3331.     cat >> confdefs.h <<\EOF
  3332. #define STAT_STATFS2_BSIZE 1
  3333. EOF
  3334.  
  3335.       fi
  3336.     fi
  3337.  
  3338.     if test $space = no; then
  3339.     # SVR3
  3340.       echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
  3341.       if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
  3342.   echo $ac_n "(cached) $ac_c" 1>&6
  3343. else
  3344.   if test "$cross_compiling" = yes; then
  3345.   fu_cv_sys_stat_statfs4=no
  3346. else
  3347. cat > conftest.$ac_ext <<EOF
  3348. #line 3349 "configure"
  3349. #include "confdefs.h"
  3350. #include <sys/types.h>
  3351. #include <sys/statfs.h>
  3352.       main ()
  3353.       {
  3354.       struct statfs fsd;
  3355.       exit (statfs (".", &fsd, sizeof fsd, 0));
  3356.       }
  3357. EOF
  3358. eval $ac_link
  3359. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3360.   fu_cv_sys_stat_statfs4=yes
  3361. else
  3362.   fu_cv_sys_stat_statfs4=no
  3363. fi
  3364. fi
  3365. rm -fr conftest*
  3366. fi
  3367.  
  3368.       echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
  3369.       if test $fu_cv_sys_stat_statfs4 = yes; then
  3370.     space=yes
  3371.     cat >> confdefs.h <<\EOF
  3372. #define STAT_STATFS4 1
  3373. EOF
  3374.  
  3375.       fi
  3376.     fi
  3377.  
  3378.     if test $space = no; then
  3379.     # 4.4BSD and NetBSD
  3380.       echo $ac_n "checking for two-argument statfs with statfs.fsize     member (4.4BSD and NetBSD)""... $ac_c" 1>&6
  3381.       if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
  3382.   echo $ac_n "(cached) $ac_c" 1>&6
  3383. else
  3384.   if test "$cross_compiling" = yes; then
  3385.   fu_cv_sys_stat_statfs2_fsize=no
  3386. else
  3387. cat > conftest.$ac_ext <<EOF
  3388. #line 3389 "configure"
  3389. #include "confdefs.h"
  3390. #include <sys/types.h>
  3391. #ifdef HAVE_SYS_PARAM_H
  3392. #include <sys/param.h>
  3393. #endif
  3394. #ifdef HAVE_SYS_MOUNT_H
  3395. #include <sys/mount.h>
  3396. #endif
  3397.       main ()
  3398.       {
  3399.       struct statfs fsd;
  3400.       fsd.f_fsize = 0;
  3401.       exit (statfs (".", &fsd));
  3402.       }
  3403. EOF
  3404. eval $ac_link
  3405. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3406.   fu_cv_sys_stat_statfs2_fsize=yes
  3407. else
  3408.   fu_cv_sys_stat_statfs2_fsize=no
  3409. fi
  3410. fi
  3411. rm -fr conftest*
  3412. fi
  3413.  
  3414.       echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
  3415.       if test $fu_cv_sys_stat_statfs2_fsize = yes; then
  3416.     space=yes
  3417.     cat >> confdefs.h <<\EOF
  3418. #define STAT_STATFS2_FSIZE 1
  3419. EOF
  3420.  
  3421.       fi
  3422.     fi
  3423.  
  3424.     if test $space = no; then
  3425.       # Ultrix
  3426.       echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
  3427.       if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
  3428.   echo $ac_n "(cached) $ac_c" 1>&6
  3429. else
  3430.   if test "$cross_compiling" = yes; then
  3431.   fu_cv_sys_stat_fs_data=no
  3432. else
  3433. cat > conftest.$ac_ext <<EOF
  3434. #line 3435 "configure"
  3435. #include "confdefs.h"
  3436.  
  3437. #include <sys/types.h>
  3438. #ifdef HAVE_SYS_PARAM_H
  3439. #include <sys/param.h>
  3440. #endif
  3441. #ifdef HAVE_SYS_MOUNT_H
  3442. #include <sys/mount.h>
  3443. #endif
  3444. #ifdef HAVE_SYS_FS_TYPES_H
  3445. #include <sys/fs_types.h>
  3446. #endif
  3447.       main ()
  3448.       {
  3449.       struct fs_data fsd;
  3450.       /* Ultrix's statfs returns 1 for success,
  3451.      0 for not mounted, -1 for failure.  */
  3452.       exit (statfs (".", &fsd) != 1);
  3453.       }
  3454. EOF
  3455. eval $ac_link
  3456. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3457.   fu_cv_sys_stat_fs_data=yes
  3458. else
  3459.   fu_cv_sys_stat_fs_data=no
  3460. fi
  3461. fi
  3462. rm -fr conftest*
  3463. fi
  3464.  
  3465.       echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
  3466.       if test $fu_cv_sys_stat_fs_data = yes; then
  3467.     space=yes
  3468.     cat >> confdefs.h <<\EOF
  3469. #define STAT_STATFS2_FS_DATA 1
  3470. EOF
  3471.  
  3472.       fi
  3473.     fi
  3474.  
  3475.                         
  3476.  
  3477.  
  3478. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  3479. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  3480.   echo $ac_n "(cached) $ac_c" 1>&6
  3481. else
  3482.   cat > conftest.$ac_ext <<EOF
  3483. #line 3484 "configure"
  3484. #include "confdefs.h"
  3485. #include <sys/types.h>
  3486. #if STDC_HEADERS
  3487. #include <stdlib.h>
  3488. #endif
  3489. EOF
  3490. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3491.   egrep "mode_t" >/dev/null 2>&1; then
  3492.   rm -rf conftest*
  3493.   ac_cv_type_mode_t=yes
  3494. else
  3495.   rm -rf conftest*
  3496.   ac_cv_type_mode_t=no
  3497. fi
  3498. rm -f conftest*
  3499.  
  3500. fi
  3501. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  3502. if test $ac_cv_type_mode_t = no; then
  3503.   cat >> confdefs.h <<\EOF
  3504. #define mode_t int
  3505. EOF
  3506.  
  3507. fi
  3508.  
  3509. echo $ac_n "checking for umode_t""... $ac_c" 1>&6
  3510. if eval "test \"`echo '$''{'ac_cv_type_umode_t'+set}'`\" = set"; then
  3511.   echo $ac_n "(cached) $ac_c" 1>&6
  3512. else
  3513.   cat > conftest.$ac_ext <<EOF
  3514. #line 3515 "configure"
  3515. #include "confdefs.h"
  3516. #include <sys/types.h>
  3517. #if STDC_HEADERS
  3518. #include <stdlib.h>
  3519. #endif
  3520. EOF
  3521. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3522.   egrep "umode_t" >/dev/null 2>&1; then
  3523.   rm -rf conftest*
  3524.   ac_cv_type_umode_t=yes
  3525. else
  3526.   rm -rf conftest*
  3527.   ac_cv_type_umode_t=no
  3528. fi
  3529. rm -f conftest*
  3530.  
  3531. fi
  3532. echo "$ac_t""$ac_cv_type_umode_t" 1>&6
  3533. if test $ac_cv_type_umode_t = no; then
  3534.   cat >> confdefs.h <<\EOF
  3535. #define umode_t int
  3536. EOF
  3537.  
  3538. fi
  3539.  
  3540. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  3541. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  3542.   echo $ac_n "(cached) $ac_c" 1>&6
  3543. else
  3544.   cat > conftest.$ac_ext <<EOF
  3545. #line 3546 "configure"
  3546. #include "confdefs.h"
  3547. #include <sys/types.h>
  3548. #if STDC_HEADERS
  3549. #include <stdlib.h>
  3550. #endif
  3551. EOF
  3552. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3553.   egrep "off_t" >/dev/null 2>&1; then
  3554.   rm -rf conftest*
  3555.   ac_cv_type_off_t=yes
  3556. else
  3557.   rm -rf conftest*
  3558.   ac_cv_type_off_t=no
  3559. fi
  3560. rm -f conftest*
  3561.  
  3562. fi
  3563. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  3564. if test $ac_cv_type_off_t = no; then
  3565.   cat >> confdefs.h <<\EOF
  3566. #define off_t long
  3567. EOF
  3568.  
  3569. fi
  3570.  
  3571. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  3572. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  3573.   echo $ac_n "(cached) $ac_c" 1>&6
  3574. else
  3575.   cat > conftest.$ac_ext <<EOF
  3576. #line 3577 "configure"
  3577. #include "confdefs.h"
  3578. #include <sys/types.h>
  3579. #if STDC_HEADERS
  3580. #include <stdlib.h>
  3581. #endif
  3582. EOF
  3583. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3584.   egrep "pid_t" >/dev/null 2>&1; then
  3585.   rm -rf conftest*
  3586.   ac_cv_type_pid_t=yes
  3587. else
  3588.   rm -rf conftest*
  3589.   ac_cv_type_pid_t=no
  3590. fi
  3591. rm -f conftest*
  3592.  
  3593. fi
  3594. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  3595. if test $ac_cv_type_pid_t = no; then
  3596.   cat >> confdefs.h <<\EOF
  3597. #define pid_t int
  3598. EOF
  3599.  
  3600. fi
  3601.  
  3602. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  3603. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  3604.   echo $ac_n "(cached) $ac_c" 1>&6
  3605. else
  3606.   cat > conftest.$ac_ext <<EOF
  3607. #line 3608 "configure"
  3608. #include "confdefs.h"
  3609. #include <sys/types.h>
  3610. EOF
  3611. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3612.   egrep "uid_t" >/dev/null 2>&1; then
  3613.   rm -rf conftest*
  3614.   ac_cv_type_uid_t=yes
  3615. else
  3616.   rm -rf conftest*
  3617.   ac_cv_type_uid_t=no
  3618. fi
  3619. rm -f conftest*
  3620.  
  3621. fi
  3622.  
  3623. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  3624. if test $ac_cv_type_uid_t = no; then
  3625.   cat >> confdefs.h <<\EOF
  3626. #define uid_t int
  3627. EOF
  3628.  
  3629.   cat >> confdefs.h <<\EOF
  3630. #define gid_t int
  3631. EOF
  3632.  
  3633. fi
  3634.  
  3635.  
  3636. for ac_func in valloc getpagesize
  3637. do
  3638. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3639. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3640.   echo $ac_n "(cached) $ac_c" 1>&6
  3641. else
  3642.   cat > conftest.$ac_ext <<EOF
  3643. #line 3644 "configure"
  3644. #include "confdefs.h"
  3645. /* System header to define __stub macros and hopefully few prototypes,
  3646.     which can conflict with char $ac_func(); below.  */
  3647. #include <assert.h>
  3648. /* Override any gcc2 internal prototype to avoid an error.  */
  3649. char $ac_func();
  3650.  
  3651. int main() { return 0; }
  3652. int t() {
  3653.  
  3654. /* The GNU C library defines this for functions which it implements
  3655.     to always fail with ENOSYS.  Some functions are actually named
  3656.     something starting with __ and the normal name is an alias.  */
  3657. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3658. choke me
  3659. #else
  3660. $ac_func();
  3661. #endif
  3662.  
  3663. ; return 0; }
  3664. EOF
  3665. if eval $ac_link; then
  3666.   rm -rf conftest*
  3667.   eval "ac_cv_func_$ac_func=yes"
  3668. else
  3669.   rm -rf conftest*
  3670.   eval "ac_cv_func_$ac_func=no"
  3671. fi
  3672. rm -f conftest*
  3673.  
  3674. fi
  3675. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3676.   echo "$ac_t""yes" 1>&6
  3677.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3678.   cat >> confdefs.h <<EOF
  3679. #define $ac_tr_func 1
  3680. EOF
  3681.  
  3682. else
  3683.   echo "$ac_t""no" 1>&6
  3684. fi
  3685. done
  3686.  
  3687. echo $ac_n "checking for working mmap""... $ac_c" 1>&6
  3688. if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
  3689.   echo $ac_n "(cached) $ac_c" 1>&6
  3690. else
  3691.   if test "$cross_compiling" = yes; then
  3692.   ac_cv_func_mmap=no
  3693. else
  3694. cat > conftest.$ac_ext <<EOF
  3695. #line 3696 "configure"
  3696. #include "confdefs.h"
  3697.  
  3698. /* Thanks to Mike Haertel and Jim Avera for this test. */
  3699. #include <sys/types.h>
  3700. #include <fcntl.h>
  3701. #include <sys/mman.h>
  3702.  
  3703. #ifndef HAVE_GETPAGESIZE
  3704. # include <sys/param.h>
  3705. # ifdef EXEC_PAGESIZE
  3706. #  define getpagesize() EXEC_PAGESIZE
  3707. # else
  3708. #  ifdef NBPG
  3709. #   define getpagesize() NBPG * CLSIZE
  3710. #   ifndef CLSIZE
  3711. #    define CLSIZE 1
  3712. #   endif
  3713. #  else
  3714. #   ifdef NBPC
  3715. #    define getpagesize() NBPC
  3716. #   else
  3717. #    define getpagesize() PAGESIZE /* SVR4 */
  3718. #   endif
  3719. #  endif
  3720. # endif
  3721. #endif
  3722.  
  3723. #ifndef HAVE_VALLOC
  3724. # define valloc malloc
  3725. #endif
  3726.  
  3727. #ifdef __cplusplus
  3728. extern "C" { void *valloc(unsigned), *malloc(unsigned); }
  3729. #else
  3730. char *valloc(), *malloc();
  3731. #endif
  3732.  
  3733. int
  3734. main()
  3735. {
  3736.   char *buf1, *buf2, *buf3;
  3737.   int i = getpagesize(), j;
  3738.   int i2 = i * 2;
  3739.   int fd;
  3740.  
  3741.   buf1 = (char *)valloc(i2);
  3742.   buf2 = (char *)valloc(i);
  3743.   buf3 = (char *)malloc(i2);
  3744.   for (j = 0; j < i2; ++j)
  3745.     *(buf1 + j) = rand();
  3746.   fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
  3747.   write(fd, buf1, i2);
  3748.   mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
  3749.   for (j = 0; j < i; ++j)
  3750.     if (*(buf1 + j) != *(buf2 + j))
  3751.       exit(1);
  3752.   lseek(fd, (long)i, 0);
  3753.   read(fd, buf2, i); /* read into mapped memory -- file should not change */
  3754.   /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
  3755.   lseek(fd, (long)0, 0);
  3756.   read(fd, buf3, i2);
  3757.   for (j = 0; j < i2; ++j)
  3758.     if (*(buf1 + j) != *(buf3 + j))
  3759.       exit(1);
  3760.   exit(0);
  3761. }
  3762.  
  3763. EOF
  3764. eval $ac_link
  3765. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3766.   ac_cv_func_mmap=yes
  3767. else
  3768.   ac_cv_func_mmap=no
  3769. fi
  3770. fi
  3771. rm -fr conftest*
  3772. fi
  3773.  
  3774. echo "$ac_t""$ac_cv_func_mmap" 1>&6
  3775. if test $ac_cv_func_mmap = yes; then
  3776.   cat >> confdefs.h <<\EOF
  3777. #define HAVE_MMAP 1
  3778. EOF
  3779.  
  3780. fi
  3781.  
  3782.  
  3783.  
  3784. # If we find X, set shell vars x_includes and x_libraries to the
  3785. # paths, otherwise set no_x=yes.
  3786. # Uses ac_ vars as temps to allow command line to override cache and checks.
  3787. # --without-x overrides everything else, but does not touch the cache.
  3788. echo $ac_n "checking for X""... $ac_c" 1>&6
  3789.  
  3790. # Check whether --with-x or --without-x was given.
  3791. if test "${with_x+set}" = set; then
  3792.   withval="$with_x"
  3793.   :
  3794. fi
  3795.  
  3796. if test "x$with_x" = xno; then
  3797.   no_x=yes
  3798. else
  3799.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  3800.     no_x=
  3801.   else
  3802. if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
  3803.   echo $ac_n "(cached) $ac_c" 1>&6
  3804. else
  3805.   # One or both of the vars are not set, and there is no cached value.
  3806. no_x=yes
  3807. rm -fr conftestdir
  3808. if mkdir conftestdir; then
  3809.   cd conftestdir
  3810.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  3811.   cat > Imakefile <<'EOF'
  3812. acfindx:
  3813.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  3814. EOF
  3815.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  3816.     no_x=
  3817.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  3818.     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  3819.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  3820.     for ac_extension in a so sl; do
  3821.       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  3822.         test -f $ac_im_libdir/libX11.$ac_extension; then
  3823.         ac_im_usrlibdir=$ac_im_libdir; break
  3824.       fi
  3825.     done
  3826.     # Screen out bogus values from the imake configuration.
  3827.     case "$ac_im_incroot" in
  3828.     /usr/include) ;;
  3829.     *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  3830.     esac
  3831.     case "$ac_im_usrlibdir" in
  3832.     /usr/lib | /lib) ;;
  3833.     *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  3834.     esac
  3835.   fi
  3836.   cd ..
  3837.   rm -fr conftestdir
  3838. fi
  3839.  
  3840. if test "$no_x" = yes; then
  3841. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  3842. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  3843. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  3844. cat > conftest.$ac_ext <<EOF
  3845. #line 3846 "configure"
  3846. #include "confdefs.h"
  3847. #include <$x_direct_test_include>
  3848. EOF
  3849. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3850. ac_err=`grep -v '^ *+' conftest.out`
  3851. if test -z "$ac_err"; then
  3852.   rm -rf conftest*
  3853.   no_x= ac_x_includes=
  3854. else
  3855.   echo "$ac_err" >&5
  3856.   rm -rf conftest*
  3857.     for ac_dir in               \
  3858.     /usr/X11R6/include        \
  3859.     /usr/X11R5/include        \
  3860.     /usr/X11R4/include        \
  3861.                               \
  3862.     /usr/include/X11R6        \
  3863.     /usr/include/X11R5        \
  3864.     /usr/include/X11R4        \
  3865.                               \
  3866.     /usr/local/X11R6/include  \
  3867.     /usr/local/X11R5/include  \
  3868.     /usr/local/X11R4/include  \
  3869.                               \
  3870.     /usr/local/include/X11R6  \
  3871.     /usr/local/include/X11R5  \
  3872.     /usr/local/include/X11R4  \
  3873.                               \
  3874.     /usr/X11/include          \
  3875.     /usr/include/X11          \
  3876.     /usr/local/X11/include    \
  3877.     /usr/local/include/X11    \
  3878.                               \
  3879.     /usr/X386/include         \
  3880.     /usr/x386/include         \
  3881.     /usr/XFree86/include/X11  \
  3882.                               \
  3883.     /usr/include              \
  3884.     /usr/local/include        \
  3885.     /usr/unsupported/include  \
  3886.     /usr/athena/include       \
  3887.     /usr/local/x11r5/include  \
  3888.     /usr/lpp/Xamples/include  \
  3889.                               \
  3890.     /usr/openwin/include      \
  3891.     /usr/openwin/share/include \
  3892.     ; \
  3893.   do
  3894.     if test -r "$ac_dir/$x_direct_test_include"; then
  3895.       no_x= ac_x_includes=$ac_dir
  3896.       break
  3897.     fi
  3898.   done
  3899. fi
  3900. rm -f conftest*
  3901.  
  3902. # Check for the libraries.
  3903. # See if we find them without any special options.
  3904. # Don't add to $LIBS permanently.
  3905. ac_save_LIBS="$LIBS"
  3906. LIBS="-l$x_direct_test_library $LIBS"
  3907. cat > conftest.$ac_ext <<EOF
  3908. #line 3909 "configure"
  3909. #include "confdefs.h"
  3910.  
  3911. int main() { return 0; }
  3912. int t() {
  3913. ${x_direct_test_function}()
  3914. ; return 0; }
  3915. EOF
  3916. if eval $ac_link; then
  3917.   rm -rf conftest*
  3918.   LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
  3919. else
  3920.   rm -rf conftest*
  3921.   LIBS="$ac_save_LIBS"
  3922. # First see if replacing the include by lib works.
  3923. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  3924.     /usr/X11R6/lib        \
  3925.     /usr/X11R5/lib        \
  3926.     /usr/X11R4/lib        \
  3927.                           \
  3928.     /usr/lib/X11R6        \
  3929.     /usr/lib/X11R5        \
  3930.     /usr/lib/X11R4        \
  3931.                           \
  3932.     /usr/local/X11R6/lib  \
  3933.     /usr/local/X11R5/lib  \
  3934.     /usr/local/X11R4/lib  \
  3935.                           \
  3936.     /usr/local/lib/X11R6  \
  3937.     /usr/local/lib/X11R5  \
  3938.     /usr/local/lib/X11R4  \
  3939.                           \
  3940.     /usr/X11/lib          \
  3941.     /usr/lib/X11          \
  3942.     /usr/local/X11/lib    \
  3943.     /usr/local/lib/X11    \
  3944.                           \
  3945.     /usr/X386/lib         \
  3946.     /usr/x386/lib         \
  3947.     /usr/XFree86/lib/X11  \
  3948.                           \
  3949.     /usr/lib              \
  3950.     /usr/local/lib        \
  3951.     /usr/unsupported/lib  \
  3952.     /usr/athena/lib       \
  3953.     /usr/local/x11r5/lib  \
  3954.     /usr/lpp/Xamples/lib  \
  3955.                           \
  3956.     /usr/openwin/lib      \
  3957.     /usr/openwin/share/lib \
  3958.     ; \
  3959. do
  3960.   for ac_extension in a so sl; do
  3961.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  3962.       no_x= ac_x_libraries=$ac_dir
  3963.       break 2
  3964.     fi
  3965.   done
  3966. done
  3967. fi
  3968. rm -f conftest*
  3969.  
  3970. fi
  3971. if test "$no_x" = yes; then
  3972.   ac_cv_path_x="no_x=yes"
  3973. else
  3974.   ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  3975. fi
  3976. fi
  3977.   fi
  3978.   eval "$ac_cv_path_x"
  3979. fi # $with_x != no
  3980.  
  3981. if test "$no_x" = yes; then
  3982.   echo "$ac_t""no" 1>&6
  3983. else
  3984.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  3985.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  3986.   ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  3987.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  3988. fi
  3989.  
  3990. if test "$no_x" = yes; then 
  3991.   # Not all programs may use this symbol, but it does not hurt to define it.
  3992.   X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
  3993. else
  3994.   if test -n "$x_includes"; then
  3995.     X_CFLAGS="$X_CFLAGS -I$x_includes"
  3996.   fi
  3997.  
  3998.   # It would be nice to have a more robust check for the -R ld option than
  3999.   # just checking for Solaris.
  4000.   # It would also be nice to do this for all -L options, not just this one.
  4001.   if test -n "$x_libraries"; then
  4002.     X_LIBS="$X_LIBS -L$x_libraries"
  4003.     if test "`(uname) 2>/dev/null`" = SunOS &&
  4004.       uname -r | grep '^5' >/dev/null; then
  4005.       X_LIBS="$X_LIBS -R $x_libraries"
  4006.     fi
  4007.   fi
  4008.  
  4009.   # Check for libraries that X11R6 Xt/Xaw programs need.
  4010.  
  4011.   ac_save_LDFLAGS="$LDFLAGS"
  4012.   LDFLAGS="$LDFLAGS -L$x_libraries"
  4013.   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  4014.   # check for ICE first), but we must link in the order -lSM -lICE or
  4015.   # we get undefined symbols.  So assume we have SM if we have ICE.
  4016.   # These have to be linked with before -lX11, unlike the other
  4017.   # libraries we check for below, so use a different variable.
  4018.   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  4019.   echo $ac_n "checking for -lICE""... $ac_c" 1>&6
  4020. ac_lib_var=`echo ICE | tr '.-/+' '___p'`
  4021. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4022.   echo $ac_n "(cached) $ac_c" 1>&6
  4023. else
  4024.   ac_save_LIBS="$LIBS"
  4025. LIBS="-lICE  $LIBS"
  4026. cat > conftest.$ac_ext <<EOF
  4027. #line 4028 "configure"
  4028. #include "confdefs.h"
  4029.  
  4030. int main() { return 0; }
  4031. int t() {
  4032. IceConnectionNumber()
  4033. ; return 0; }
  4034. EOF
  4035. if eval $ac_link; then
  4036.   rm -rf conftest*
  4037.   eval "ac_cv_lib_$ac_lib_var=yes"
  4038. else
  4039.   rm -rf conftest*
  4040.   eval "ac_cv_lib_$ac_lib_var=no"
  4041. fi
  4042. rm -f conftest*
  4043. LIBS="$ac_save_LIBS"
  4044.  
  4045. fi
  4046. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4047.   echo "$ac_t""yes" 1>&6
  4048.   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  4049. else
  4050.   echo "$ac_t""no" 1>&6
  4051. fi
  4052.  
  4053.   LDFLAGS="$ac_save_LDFLAGS"
  4054.  
  4055.   # Check for system-dependent libraries X programs must link with.
  4056.  
  4057.   if test "$ISC" = yes; then
  4058.     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  4059.   else
  4060.     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
  4061.     # libraries were built with DECnet support.  And karl@cs.umb.edu says
  4062.     # the Alpha needs dnet_stub (dnet does not exist).
  4063.     echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
  4064. ac_lib_var=`echo dnet | tr '.-/+' '___p'`
  4065. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4066.   echo $ac_n "(cached) $ac_c" 1>&6
  4067. else
  4068.   ac_save_LIBS="$LIBS"
  4069. LIBS="-ldnet  $LIBS"
  4070. cat > conftest.$ac_ext <<EOF
  4071. #line 4072 "configure"
  4072. #include "confdefs.h"
  4073.  
  4074. int main() { return 0; }
  4075. int t() {
  4076. dnet_ntoa()
  4077. ; return 0; }
  4078. EOF
  4079. if eval $ac_link; then
  4080.   rm -rf conftest*
  4081.   eval "ac_cv_lib_$ac_lib_var=yes"
  4082. else
  4083.   rm -rf conftest*
  4084.   eval "ac_cv_lib_$ac_lib_var=no"
  4085. fi
  4086. rm -f conftest*
  4087. LIBS="$ac_save_LIBS"
  4088.  
  4089. fi
  4090. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4091.   echo "$ac_t""yes" 1>&6
  4092.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  4093. else
  4094.   echo "$ac_t""no" 1>&6
  4095. fi
  4096.  
  4097.     if test $ac_cv_lib_dnet = no; then
  4098.       echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
  4099. ac_lib_var=`echo dnet_stub | tr '.-/+' '___p'`
  4100. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4101.   echo $ac_n "(cached) $ac_c" 1>&6
  4102. else
  4103.   ac_save_LIBS="$LIBS"
  4104. LIBS="-ldnet_stub  $LIBS"
  4105. cat > conftest.$ac_ext <<EOF
  4106. #line 4107 "configure"
  4107. #include "confdefs.h"
  4108.  
  4109. int main() { return 0; }
  4110. int t() {
  4111. dnet_ntoa()
  4112. ; return 0; }
  4113. EOF
  4114. if eval $ac_link; then
  4115.   rm -rf conftest*
  4116.   eval "ac_cv_lib_$ac_lib_var=yes"
  4117. else
  4118.   rm -rf conftest*
  4119.   eval "ac_cv_lib_$ac_lib_var=no"
  4120. fi
  4121. rm -f conftest*
  4122. LIBS="$ac_save_LIBS"
  4123.  
  4124. fi
  4125. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4126.   echo "$ac_t""yes" 1>&6
  4127.   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  4128. else
  4129.   echo "$ac_t""no" 1>&6
  4130. fi
  4131.  
  4132.     fi
  4133.  
  4134.     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  4135.     # to get the SysV transport functions.
  4136.     # Not sure which flavor of 386 UNIX this is, but it seems harmless to
  4137.     # check for it.
  4138.     echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  4139. ac_lib_var=`echo nsl | tr '.-/+' '___p'`
  4140. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4141.   echo $ac_n "(cached) $ac_c" 1>&6
  4142. else
  4143.   ac_save_LIBS="$LIBS"
  4144. LIBS="-lnsl  $LIBS"
  4145. cat > conftest.$ac_ext <<EOF
  4146. #line 4147 "configure"
  4147. #include "confdefs.h"
  4148.  
  4149. int main() { return 0; }
  4150. int t() {
  4151. t_accept()
  4152. ; return 0; }
  4153. EOF
  4154. if eval $ac_link; then
  4155.   rm -rf conftest*
  4156.   eval "ac_cv_lib_$ac_lib_var=yes"
  4157. else
  4158.   rm -rf conftest*
  4159.   eval "ac_cv_lib_$ac_lib_var=no"
  4160. fi
  4161. rm -f conftest*
  4162. LIBS="$ac_save_LIBS"
  4163.  
  4164. fi
  4165. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4166.   echo "$ac_t""yes" 1>&6
  4167.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  4168. else
  4169.   echo "$ac_t""no" 1>&6
  4170. fi
  4171.  
  4172.  
  4173.     # lieder@skyler.mavd.honeywell.com says without -lsocket,
  4174.     # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
  4175.     # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
  4176.     if test "`(uname) 2>/dev/null`" != IRIX; then
  4177.       echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  4178. ac_lib_var=`echo socket | tr '.-/+' '___p'`
  4179. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4180.   echo $ac_n "(cached) $ac_c" 1>&6
  4181. else
  4182.   ac_save_LIBS="$LIBS"
  4183. LIBS="-lsocket  $LIBS"
  4184. cat > conftest.$ac_ext <<EOF
  4185. #line 4186 "configure"
  4186. #include "confdefs.h"
  4187.  
  4188. int main() { return 0; }
  4189. int t() {
  4190. socket()
  4191. ; return 0; }
  4192. EOF
  4193. if eval $ac_link; then
  4194.   rm -rf conftest*
  4195.   eval "ac_cv_lib_$ac_lib_var=yes"
  4196. else
  4197.   rm -rf conftest*
  4198.   eval "ac_cv_lib_$ac_lib_var=no"
  4199. fi
  4200. rm -f conftest*
  4201. LIBS="$ac_save_LIBS"
  4202.  
  4203. fi
  4204. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4205.   echo "$ac_t""yes" 1>&6
  4206.   X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
  4207. else
  4208.   echo "$ac_t""no" 1>&6
  4209. fi
  4210.  
  4211.     fi
  4212.   fi
  4213. fi
  4214.  
  4215.  
  4216. xvers="none"
  4217. mxc=""
  4218.  
  4219. no_xview=yes
  4220. # Check whether --with-xview or --without-xview was given.
  4221. if test "${with_xview+set}" = set; then
  4222.   withval="$with_xview"
  4223.   no_xview=
  4224. fi
  4225.  
  4226.  
  4227. # Check whether --with-xview-includes or --without-xview-includes was given.
  4228. if test "${with_xview_includes+set}" = set; then
  4229.   withval="$with_xview_includes"
  4230.   
  4231. if test x$withval = xyes; then
  4232.     echo "configure: warning: Usage is: --with-xview-includes=path" 1>&2
  4233.     xview_includes=NONE
  4234.     no_xview=
  4235. else
  4236.     xview_includes=$withval
  4237. fi
  4238.  
  4239. else
  4240.   
  4241. xview_includes=NONE
  4242.  
  4243. fi
  4244. # Check whether --with-xview-libraries or --without-xview-libraries was given.
  4245. if test "${with_xview_libraries+set}" = set; then
  4246.   withval="$with_xview_libraries"
  4247.   
  4248. if test x$withval = xyes; then
  4249.     echo "configure: warning: Usage is: --with-xview-libraries=path" 1>&2
  4250.     xview_libraries=NONE
  4251.     no_xview=
  4252. else
  4253.     xview_libraries=$withval
  4254. fi
  4255.  
  4256. else
  4257.   
  4258. xview_libraries=NONE
  4259.  
  4260. fi
  4261.  
  4262. if test "$no_xview" != yes; then
  4263.     if test "$no_x" = yes; then
  4264.         no_xview=yes
  4265.     fi
  4266. fi
  4267. if test "$no_xview" != yes; then
  4268. echo $ac_n "checking for XView""... $ac_c" 1>&6
  4269. if test x$xview_libraries = xNONE; then 
  4270.     if test x$xview_includes = xNONE; then
  4271. if eval "test \"`echo '$''{'ac_cv_path_xview'+set}'`\" = set"; then
  4272.   echo $ac_n "(cached) $ac_c" 1>&6
  4273. else
  4274.   
  4275.     no_xview=yes
  4276. rm -fr conftestdir
  4277. if mkdir conftestdir; then
  4278.   cd conftestdir
  4279.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  4280.   cat > Imakefile <<'EOF'
  4281. #include <XView.tmpl>
  4282. acfindxv:
  4283.     @echo 'ac_im_library_dest="${LIBRARY_DEST}"; ac_im_header_dest="${HEADER_DEST}"'
  4284. EOF
  4285.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  4286.     no_xview=
  4287.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  4288.     eval `make acfindxv 2>/dev/null | grep -v make`
  4289.     # Screen out bogus values from the imake configuration.
  4290.     if test -f "$ac_im_header_dest/xview/xview.h"; then
  4291.         ac_xview_includes="$ac_im_header_dest"
  4292.     else
  4293.     no_xview=yes
  4294.     fi
  4295.     if test -d "$ac_im_library_dest"; then
  4296.         ac_xview_libraries="$ac_im_library_dest"
  4297.     else
  4298.     no_xview=yes
  4299.     fi
  4300.   fi
  4301.   if test "x$no_xview" != xyes; then
  4302.     if test -f "$ac_xview_includes/xview_private/draw_impl.h"; then
  4303.     ac_xview_no_private_headers=
  4304.     else
  4305.     ac_xview_no_private_headers=yes
  4306.     fi
  4307.   fi
  4308.   cd ..
  4309.   rm -fr conftestdir
  4310. fi
  4311.  
  4312.     if test "x$no_xview" = xyes; then
  4313. test -z "$xview_direct_test_library" && xview_direct_test_library=xview
  4314. test -z "$xview_direct_test_function" && xview_direct_test_function=xv_unique_key
  4315. test -z "$xview_direct_test_include" && xview_direct_test_include=xview/xview.h
  4316. cat > conftest.$ac_ext <<EOF
  4317. #line 4318 "configure"
  4318. #include "confdefs.h"
  4319. #include <$xview_direct_test_include>
  4320. EOF
  4321. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4322. ac_err=`grep -v '^ *+' conftest.out`
  4323. if test -z "$ac_err"; then
  4324.   rm -rf conftest*
  4325.   no_xview= ac_xview_includes=
  4326. else
  4327.   echo "$ac_err" >&5
  4328.   rm -rf conftest*
  4329.     for ac_dir in               \
  4330.     $OPENWINHOME/include    \
  4331.     /usr/openwin/include      \
  4332.     /usr/openwin/share/include \
  4333.                               \
  4334.     /usr/X11R6/include        \
  4335.     /usr/X11R5/include        \
  4336.     /usr/X11R4/include        \
  4337.                               \
  4338.     /usr/include/X11R6        \
  4339.     /usr/include/X11R5        \
  4340.     /usr/include/X11R4        \
  4341.                               \
  4342.     /usr/local/X11R6/include  \
  4343.     /usr/local/X11R5/include  \
  4344.     /usr/local/X11R4/include  \
  4345.                               \
  4346.     /usr/local/include/X11R6  \
  4347.     /usr/local/include/X11R5  \
  4348.     /usr/local/include/X11R4  \
  4349.                               \
  4350.     /usr/X11/include          \
  4351.     /usr/include/X11          \
  4352.     /usr/local/X11/include    \
  4353.     /usr/local/include/X11    \
  4354.                               \
  4355.     /usr/X386/include         \
  4356.     /usr/x386/include         \
  4357.     /usr/XFree86/include/X11  \
  4358.                               \
  4359.     /usr/include              \
  4360.     /usr/local/include        \
  4361.     /usr/unsupported/include  \
  4362.     /usr/athena/include       \
  4363.     /usr/local/x11r5/include  \
  4364.     /usr/lpp/Xamples/include  \
  4365.     ; \
  4366.   do
  4367.     if test -r "$ac_dir/$xview_direct_test_include"; then
  4368.       no_xview= ac_xview_includes=$ac_dir
  4369.       break
  4370.     fi
  4371.   done
  4372. fi
  4373. rm -f conftest*
  4374.  
  4375. if test "x$no_xview" != xyes; then
  4376.     if test "x$ac_xview_includes" != x; then
  4377.         if test -f "$ac_xview_includes/xview_private/draw_impl.h"; then
  4378.         ac_xview_no_private_headers=
  4379.         else
  4380.         ac_xview_no_private_headers=yes
  4381.         fi
  4382.     else
  4383. cat > conftest.$ac_ext <<EOF
  4384. #line 4385 "configure"
  4385. #include "confdefs.h"
  4386. #include <xview_private/draw_impl.h>
  4387. EOF
  4388. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4389. ac_err=`grep -v '^ *+' conftest.out`
  4390. if test -z "$ac_err"; then
  4391.   rm -rf conftest*
  4392.   ac_xview_no_private_headers=
  4393. else
  4394.   echo "$ac_err" >&5
  4395.   rm -rf conftest*
  4396.   ac_xview_no_private_headers=yes
  4397. fi
  4398. rm -f conftest*
  4399.     fi
  4400. fi
  4401.  
  4402. # Check for the libraries.
  4403. # See if we find them without any special options.
  4404. # Don't add to $LIBS permanently.
  4405. ac_save_LIBS="$LIBS"
  4406. ac_save_LDFLAGS="$LDFLAGS"
  4407. LDFLAGS="$LDFLAGS $X_LIBS"
  4408. LIBS="-l$xview_direct_test_library -lolgx $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS"
  4409. cat > conftest.$ac_ext <<EOF
  4410. #line 4411 "configure"
  4411. #include "confdefs.h"
  4412. #include <$xview_direct_test_include>
  4413.  
  4414. int main() { return 0; }
  4415. int t() {
  4416. ${xview_direct_test_function}()
  4417. ; return 0; }
  4418. EOF
  4419. if eval $ac_link; then
  4420.   rm -rf conftest*
  4421.   LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS" no_xview= ac_xview_libraries=
  4422. else
  4423.   rm -rf conftest*
  4424.   LIBS="$ac_save_LIBS" LDFLAGS="$ac_save_LDFLAGS"
  4425. # First see if replacing the include by lib works.
  4426. for ac_dir in `echo "$ac_xview_includes" | sed s/include/lib/` \
  4427.     $OPENWINHOME/lib    \
  4428.     $OPENWINHOME/share/lib \
  4429.     /usr/openwin/lib      \
  4430.     /usr/openwin/share/lib \
  4431.                           \
  4432.     /usr/X11R6/lib        \
  4433.     /usr/X11R5/lib        \
  4434.     /usr/X11R4/lib        \
  4435.                           \
  4436.     /usr/lib/X11R6        \
  4437.     /usr/lib/X11R5        \
  4438.     /usr/lib/X11R4        \
  4439.                           \
  4440.     /usr/local/X11R6/lib  \
  4441.     /usr/local/X11R5/lib  \
  4442.     /usr/local/X11R4/lib  \
  4443.                           \
  4444.     /usr/local/lib/X11R6  \
  4445.     /usr/local/lib/X11R5  \
  4446.     /usr/local/lib/X11R4  \
  4447.                           \
  4448.     /usr/X11/lib          \
  4449.     /usr/lib/X11          \
  4450.     /usr/local/X11/lib    \
  4451.     /usr/local/lib/X11    \
  4452.                           \
  4453.     /usr/X386/lib         \
  4454.     /usr/x386/lib         \
  4455.     /usr/XFree86/lib/X11  \
  4456.                           \
  4457.     /usr/lib              \
  4458.     /usr/local/lib        \
  4459.     /usr/unsupported/lib  \
  4460.     /usr/athena/lib       \
  4461.     /usr/local/x11r5/lib  \
  4462.     /usr/lpp/Xamples/lib  \
  4463.     ; \
  4464. do
  4465.   for ac_extension in a so sl; do
  4466.     if test -r $ac_dir/lib${xview_direct_test_library}.$ac_extension; then
  4467.       no_xview= ac_xview_libraries=$ac_dir
  4468.       break 2
  4469.     fi
  4470.   done
  4471. done
  4472. fi
  4473. rm -f conftest*
  4474.  
  4475.     fi
  4476.     if test "x$no_xview" = xyes; then
  4477.         ac_cv_path_xview="no_xview=yes"
  4478.     else
  4479.         ac_cv_path_xview="no_xview= ac_xview_includes=$ac_xview_includes ac_xview_libraries=$ac_xview_libraries ac_xview_no_private_headers=$ac_xview_no_private_headers"
  4480.     fi
  4481.  
  4482. fi
  4483.         eval "$ac_cv_path_xview"
  4484.     fi
  4485. fi
  4486.  
  4487. if test "x$no_xview" = xyes; then
  4488.     echo "$ac_t""no" 1>&6
  4489. else
  4490.     if test "x$xview_includes" = x || test "x$xview_includes" = xNONE; then
  4491.         xview_includes=$ac_xview_includes
  4492.     fi
  4493.     if test "x$xview_libraries" = x || test "x$xview_libraries" = xNONE; then
  4494.         xview_libraries=$ac_xview_libraries
  4495.     fi
  4496.     xview_no_private_headers=$ac_xview_no_private_headers
  4497.     ac_cv_path_xview="no_xview= ac_xview_includes=$xview_includes ac_xview_libraries=$xview_libraries ac_xview_no_private_headers=$ac_xview_no_private_headers" 
  4498.     if test "x$xview_libraries" != x; then
  4499.     ac_msg_xview="libraries $xview_libraries"
  4500.     else
  4501.         ac_msg_xview=""
  4502.     fi
  4503.     if test "x$xview_includes" != x; then
  4504.         if test "x$ac_msg_xview" != x; then
  4505.         ac_msg_xview="$ac_msg_xview, "
  4506.     fi
  4507.     ac_msg_xview="${ac_msg_xview}headers $xview_includes"
  4508.     fi
  4509.     if test "x$xview_no_private_headers" = xyes; then
  4510.         if test "x$ac_msg_xview" != x; then
  4511.         ac_msg_xview="$ac_msg_xview, "
  4512.     fi
  4513.     ac_msg_xview="${ac_msg_xview}without xview_private headers"
  4514.     fi    
  4515.     echo "$ac_t""$ac_msg_xview" 1>&6
  4516. fi
  4517. fi
  4518.  
  4519. if test "$no_xview" = yes; then 
  4520.   # Not all programs may use this symbol, but it does not hurt to define it.
  4521.   XVIEW_CFLAGS="$X_CFGLAGS $XVIEW_CFLAGS -DXVIEW_MISSING"
  4522. else
  4523.   if test -n "$xview_includes"; then
  4524.     if test "$xview_includes" = "$x_includes"; then
  4525.       XVIEW_CFLAGS="$X_CFLAGS $XVIEW_CFGLAGS"
  4526.     else
  4527.       XVIEW_CFLAGS="$X_CFLAGS $XVIEW_CFGLAGS -I$xview_includes"
  4528.     fi
  4529.   fi
  4530.  
  4531.   # It would be nice to have a more robust check for the -R ld option than
  4532.   # just checking for Solaris.
  4533.   # It would also be nice to do this for all -L options, not just this one.
  4534.   if test -n "$xview_libraries"; then
  4535.     if test "$xview_libraries" = "$x_libraries"; then
  4536.       XVIEW_LIBS="$X_LIBS $XVIEW_LIBS"
  4537.     else
  4538.       XVIEW_LIBS="$X_LIBS $XVIEW_LIBS -L$xview_libraries"
  4539.       if test "`(uname) 2>/dev/null`" = SunOS &&
  4540.         uname -r | grep '^5' >/dev/null; then
  4541.         XVIEW_LIBS="$XVIEW_LIBS -R$xview_libraries"
  4542.       fi
  4543.     fi
  4544.   fi
  4545. fi
  4546. if test "x$no_xview" = xyes; then
  4547.   HAVE_XVIEW=no
  4548. else
  4549.   HAVE_XVIEW=yes
  4550. fi
  4551. if test "x$xview_no_private_headers" = xyes; then
  4552.   HAVE_XVIEW_PRIVATE_HEADERS=no
  4553. else
  4554.   HAVE_XVIEW_PRIVATE_HEADERS=yes
  4555. fi
  4556.  
  4557. if test "x$no_xview" != "xyes"; then
  4558.     mxc="mxc"
  4559.     xvers="XView"
  4560.     xvdep="xvdep"
  4561. else
  4562.     mxc=""
  4563.     xvdep=""
  4564. fi
  4565.  
  4566.  
  4567.  
  4568. xv_bindir=
  4569. if test -n "$mxc"; then
  4570. # Check whether --with-xv-bindir or --without-xv-bindir was given.
  4571. if test "${with_xv_bindir+set}" = set; then
  4572.   withval="$with_xv_bindir"
  4573.   
  4574.     if test x$withval = xyes; then
  4575.     echo "configure: warning: Usage is: --with-xv-bindir=basedir" 1>&2
  4576.     else
  4577.     if test x$withval = xno; then
  4578.         echo "configure: warning: Usage is: --with-xv-bindir=basedir" 1>&2
  4579.     else
  4580.         xv_bindir=$withval
  4581.     fi
  4582.     fi
  4583.  
  4584. fi
  4585.  
  4586. if test x$xv_bindir = x; then
  4587.     xv_bindir=`echo $xv_includes | sed s/include/bin/`
  4588.     if test ! -x $xv_bindir/openwin; then
  4589.         if test ! -x $xv_bindir/olwm; then
  4590.             if test ! -x $xv_bindir/olvwm; then
  4591.                 xv_bindir=
  4592.             fi    
  4593.         fi
  4594.     fi
  4595. fi
  4596. if test x$xv_bindir = x; then
  4597.     if test "$OPENWINHOME"; then
  4598.         xv_bindir=$OPENWINHOME/bin
  4599.     else
  4600.     # Extract the first word of "openwin", so it can be a program name with args.
  4601. set dummy openwin; ac_word=$2
  4602. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4603. if eval "test \"`echo '$''{'ac_cv_path_ac_my_xp'+set}'`\" = set"; then
  4604.   echo $ac_n "(cached) $ac_c" 1>&6
  4605. else
  4606.   case "$ac_my_xp" in
  4607.   /*)
  4608.   ac_cv_path_ac_my_xp="$ac_my_xp" # Let the user override the test with a path.
  4609.   ;;
  4610.   *)
  4611.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4612.   for ac_dir in $PATH; do
  4613.     test -z "$ac_dir" && ac_dir=.
  4614.     if test -f $ac_dir/$ac_word; then
  4615.       ac_cv_path_ac_my_xp="$ac_dir/$ac_word"
  4616.       break
  4617.     fi
  4618.   done
  4619.   IFS="$ac_save_ifs"
  4620.   ;;
  4621. esac
  4622. fi
  4623. ac_my_xp="$ac_cv_path_ac_my_xp"
  4624. if test -n "$ac_my_xp"; then
  4625.   echo "$ac_t""$ac_my_xp" 1>&6
  4626. else
  4627.   echo "$ac_t""no" 1>&6
  4628. fi
  4629.  
  4630.     if test x$ac_my_xp = x; then
  4631.         # Extract the first word of "X", so it can be a program name with args.
  4632. set dummy X; ac_word=$2
  4633. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4634. if eval "test \"`echo '$''{'ac_cv_path_ac_my_xp'+set}'`\" = set"; then
  4635.   echo $ac_n "(cached) $ac_c" 1>&6
  4636. else
  4637.   case "$ac_my_xp" in
  4638.   /*)
  4639.   ac_cv_path_ac_my_xp="$ac_my_xp" # Let the user override the test with a path.
  4640.   ;;
  4641.   *)
  4642.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4643.   for ac_dir in $PATH; do
  4644.     test -z "$ac_dir" && ac_dir=.
  4645.     if test -f $ac_dir/$ac_word; then
  4646.       ac_cv_path_ac_my_xp="$ac_dir/$ac_word"
  4647.       break
  4648.     fi
  4649.   done
  4650.   IFS="$ac_save_ifs"
  4651.   ;;
  4652. esac
  4653. fi
  4654. ac_my_xp="$ac_cv_path_ac_my_xp"
  4655. if test -n "$ac_my_xp"; then
  4656.   echo "$ac_t""$ac_my_xp" 1>&6
  4657. else
  4658.   echo "$ac_t""no" 1>&6
  4659. fi
  4660.  
  4661.         if test x$ac_my_xp = x; then
  4662.         xv_bindir=""
  4663.         else
  4664.         xv_bindir=`basename $ac_my_xp`
  4665.          fi
  4666.     else
  4667.         xv_bindir=`basename $ac_my_xp`
  4668.     fi
  4669.     fi
  4670.     if test ! -x $xv_bindir/openwin; then
  4671.         if test ! -x $xv_bindir/olwm; then
  4672.             if test ! -x $xv_bindir/olvwm; then
  4673.         if test ! -x $xv_bindir/X; then
  4674.                     xv_bindir=
  4675.         fi
  4676.             fi    
  4677.         fi
  4678.     fi
  4679. fi
  4680. if test x$xv_bindir = x; then
  4681.     xv_bindir=$prefix/bin
  4682. fi
  4683. fi
  4684. if test x$xv_bindir = xNONE/bin; then
  4685.     xv_bindir=
  4686. fi
  4687.  
  4688.  
  4689.  
  4690. for ac_func in gethostbyname
  4691. do
  4692. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4693. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4694.   echo $ac_n "(cached) $ac_c" 1>&6
  4695. else
  4696.   cat > conftest.$ac_ext <<EOF
  4697. #line 4698 "configure"
  4698. #include "confdefs.h"
  4699. /* System header to define __stub macros and hopefully few prototypes,
  4700.     which can conflict with char $ac_func(); below.  */
  4701. #include <assert.h>
  4702. /* Override any gcc2 internal prototype to avoid an error.  */
  4703. char $ac_func();
  4704.  
  4705. int main() { return 0; }
  4706. int t() {
  4707.  
  4708. /* The GNU C library defines this for functions which it implements
  4709.     to always fail with ENOSYS.  Some functions are actually named
  4710.     something starting with __ and the normal name is an alias.  */
  4711. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4712. choke me
  4713. #else
  4714. $ac_func();
  4715. #endif
  4716.  
  4717. ; return 0; }
  4718. EOF
  4719. if eval $ac_link; then
  4720.   rm -rf conftest*
  4721.   eval "ac_cv_func_$ac_func=yes"
  4722. else
  4723.   rm -rf conftest*
  4724.   eval "ac_cv_func_$ac_func=no"
  4725. fi
  4726. rm -f conftest*
  4727.  
  4728. fi
  4729. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4730.   echo "$ac_t""yes" 1>&6
  4731.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4732.   cat >> confdefs.h <<EOF
  4733. #define $ac_tr_func 1
  4734. EOF
  4735.  
  4736. else
  4737.   echo "$ac_t""no" 1>&6
  4738. echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  4739. ac_lib_var=`echo nsl | tr '.-/+' '___p'`
  4740. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4741.   echo $ac_n "(cached) $ac_c" 1>&6
  4742. else
  4743.   ac_save_LIBS="$LIBS"
  4744. LIBS="-lnsl  $LIBS"
  4745. cat > conftest.$ac_ext <<EOF
  4746. #line 4747 "configure"
  4747. #include "confdefs.h"
  4748.  
  4749. int main() { return 0; }
  4750. int t() {
  4751. gethostbyname()
  4752. ; return 0; }
  4753. EOF
  4754. if eval $ac_link; then
  4755.   rm -rf conftest*
  4756.   eval "ac_cv_lib_$ac_lib_var=yes"
  4757. else
  4758.   rm -rf conftest*
  4759.   eval "ac_cv_lib_$ac_lib_var=no"
  4760. fi
  4761. rm -f conftest*
  4762. LIBS="$ac_save_LIBS"
  4763.  
  4764. fi
  4765. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4766.   echo "$ac_t""yes" 1>&6
  4767.   LIBS="$LIBS -lnsl"
  4768. else
  4769.   echo "$ac_t""no" 1>&6
  4770. fi
  4771.  
  4772. fi
  4773. done
  4774.  
  4775.  
  4776. have_socket=no
  4777. for ac_func in socket
  4778. do
  4779. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4780. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4781.   echo $ac_n "(cached) $ac_c" 1>&6
  4782. else
  4783.   cat > conftest.$ac_ext <<EOF
  4784. #line 4785 "configure"
  4785. #include "confdefs.h"
  4786. /* System header to define __stub macros and hopefully few prototypes,
  4787.     which can conflict with char $ac_func(); below.  */
  4788. #include <assert.h>
  4789. /* Override any gcc2 internal prototype to avoid an error.  */
  4790. char $ac_func();
  4791.  
  4792. int main() { return 0; }
  4793. int t() {
  4794.  
  4795. /* The GNU C library defines this for functions which it implements
  4796.     to always fail with ENOSYS.  Some functions are actually named
  4797.     something starting with __ and the normal name is an alias.  */
  4798. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4799. choke me
  4800. #else
  4801. $ac_func();
  4802. #endif
  4803.  
  4804. ; return 0; }
  4805. EOF
  4806. if eval $ac_link; then
  4807.   rm -rf conftest*
  4808.   eval "ac_cv_func_$ac_func=yes"
  4809. else
  4810.   rm -rf conftest*
  4811.   eval "ac_cv_func_$ac_func=no"
  4812. fi
  4813. rm -f conftest*
  4814.  
  4815. fi
  4816. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4817.   echo "$ac_t""yes" 1>&6
  4818.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4819.   cat >> confdefs.h <<EOF
  4820. #define $ac_tr_func 1
  4821. EOF
  4822.  have_socket=yes
  4823. else
  4824.   echo "$ac_t""no" 1>&6
  4825. fi
  4826. done
  4827.  
  4828. if test $have_socket = no; then
  4829.   # socket is not in the default libraries.  See if it's in some other.
  4830.   for lib in bsd socket inet; do
  4831.     echo $ac_n "checking for -l$lib""... $ac_c" 1>&6
  4832. ac_lib_var=`echo $lib | tr '.-/+' '___p'`
  4833. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4834.   echo $ac_n "(cached) $ac_c" 1>&6
  4835. else
  4836.   ac_save_LIBS="$LIBS"
  4837. LIBS="-l$lib  $LIBS"
  4838. cat > conftest.$ac_ext <<EOF
  4839. #line 4840 "configure"
  4840. #include "confdefs.h"
  4841.  
  4842. int main() { return 0; }
  4843. int t() {
  4844. socket()
  4845. ; return 0; }
  4846. EOF
  4847. if eval $ac_link; then
  4848.   rm -rf conftest*
  4849.   eval "ac_cv_lib_$ac_lib_var=yes"
  4850. else
  4851.   rm -rf conftest*
  4852.   eval "ac_cv_lib_$ac_lib_var=no"
  4853. fi
  4854. rm -f conftest*
  4855. LIBS="$ac_save_LIBS"
  4856.  
  4857. fi
  4858. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4859.   echo "$ac_t""yes" 1>&6
  4860.   LIBS="$LIBS -l$lib"; have_socket=yes; break
  4861. else
  4862.   echo "$ac_t""no" 1>&6
  4863. fi
  4864.  
  4865.   done
  4866. fi
  4867.  
  4868. NETFILES=""
  4869. vfs_flags="tarfs"
  4870. use_net_code=false
  4871. if test $have_socket = yes; then
  4872.     
  4873. av_struct_linger=no
  4874. echo $ac_n "checking struct linger is available""... $ac_c" 1>&6
  4875. if test "$cross_compiling" = yes; then
  4876.   
  4877. av_struct_linger=no
  4878.  
  4879. else
  4880. cat > conftest.$ac_ext <<EOF
  4881. #line 4882 "configure"
  4882. #include "confdefs.h"
  4883.  
  4884. #include <sys/types.h>
  4885. #include <sys/socket.h>
  4886.  
  4887. struct linger li;
  4888.  
  4889. main ()
  4890. {
  4891.     li.l_onoff = 1;
  4892.     li.l_linger = 120;
  4893.     exit (0);
  4894. }
  4895.  
  4896. EOF
  4897. eval $ac_link
  4898. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  4899.   
  4900. cat >> confdefs.h <<\EOF
  4901. #define HAVE_STRUCT_LINGER 1
  4902. EOF
  4903.  
  4904. av_struct_linger=yes
  4905.  
  4906. else
  4907.   
  4908. av_struct_linger=no
  4909.  
  4910. fi
  4911. fi
  4912. rm -fr conftest*
  4913. echo "$ac_t""$av_struct_linger" 1>&6
  4914.  
  4915.     for ac_func in pmap_set
  4916. do
  4917. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4918. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4919.   echo $ac_n "(cached) $ac_c" 1>&6
  4920. else
  4921.   cat > conftest.$ac_ext <<EOF
  4922. #line 4923 "configure"
  4923. #include "confdefs.h"
  4924. /* System header to define __stub macros and hopefully few prototypes,
  4925.     which can conflict with char $ac_func(); below.  */
  4926. #include <assert.h>
  4927. /* Override any gcc2 internal prototype to avoid an error.  */
  4928. char $ac_func();
  4929.  
  4930. int main() { return 0; }
  4931. int t() {
  4932.  
  4933. /* The GNU C library defines this for functions which it implements
  4934.     to always fail with ENOSYS.  Some functions are actually named
  4935.     something starting with __ and the normal name is an alias.  */
  4936. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4937. choke me
  4938. #else
  4939. $ac_func();
  4940. #endif
  4941.  
  4942. ; return 0; }
  4943. EOF
  4944. if eval $ac_link; then
  4945.   rm -rf conftest*
  4946.   eval "ac_cv_func_$ac_func=yes"
  4947. else
  4948.   rm -rf conftest*
  4949.   eval "ac_cv_func_$ac_func=no"
  4950. fi
  4951. rm -f conftest*
  4952.  
  4953. fi
  4954. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4955.   echo "$ac_t""yes" 1>&6
  4956.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4957.   cat >> confdefs.h <<EOF
  4958. #define $ac_tr_func 1
  4959. EOF
  4960.  
  4961. else
  4962.   echo "$ac_t""no" 1>&6
  4963. echo $ac_n "checking for -lrpc""... $ac_c" 1>&6
  4964. ac_lib_var=`echo rpc | tr '.-/+' '___p'`
  4965. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4966.   echo $ac_n "(cached) $ac_c" 1>&6
  4967. else
  4968.   ac_save_LIBS="$LIBS"
  4969. LIBS="-lrpc  $LIBS"
  4970. cat > conftest.$ac_ext <<EOF
  4971. #line 4972 "configure"
  4972. #include "confdefs.h"
  4973.  
  4974. int main() { return 0; }
  4975. int t() {
  4976. pmap_set()
  4977. ; return 0; }
  4978. EOF
  4979. if eval $ac_link; then
  4980.   rm -rf conftest*
  4981.   eval "ac_cv_lib_$ac_lib_var=yes"
  4982. else
  4983.   rm -rf conftest*
  4984.   eval "ac_cv_lib_$ac_lib_var=no"
  4985. fi
  4986. rm -f conftest*
  4987. LIBS="$ac_save_LIBS"
  4988.  
  4989. fi
  4990. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4991.   echo "$ac_t""yes" 1>&6
  4992.   
  4993.      LIBS="-lrpc $LIBS"
  4994.     cat >> confdefs.h <<\EOF
  4995. #define HAVE_PMAP_SET 1
  4996. EOF
  4997.  
  4998.     
  4999. else
  5000.   echo "$ac_t""no" 1>&6
  5001. fi
  5002.  
  5003. fi
  5004. done
  5005.  
  5006.     for ac_func in pmap_getport rresvport
  5007. do
  5008. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  5009. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  5010.   echo $ac_n "(cached) $ac_c" 1>&6
  5011. else
  5012.   cat > conftest.$ac_ext <<EOF
  5013. #line 5014 "configure"
  5014. #include "confdefs.h"
  5015. /* System header to define __stub macros and hopefully few prototypes,
  5016.     which can conflict with char $ac_func(); below.  */
  5017. #include <assert.h>
  5018. /* Override any gcc2 internal prototype to avoid an error.  */
  5019. char $ac_func();
  5020.  
  5021. int main() { return 0; }
  5022. int t() {
  5023.  
  5024. /* The GNU C library defines this for functions which it implements
  5025.     to always fail with ENOSYS.  Some functions are actually named
  5026.     something starting with __ and the normal name is an alias.  */
  5027. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  5028. choke me
  5029. #else
  5030. $ac_func();
  5031. #endif
  5032.  
  5033. ; return 0; }
  5034. EOF
  5035. if eval $ac_link; then
  5036.   rm -rf conftest*
  5037.   eval "ac_cv_func_$ac_func=yes"
  5038. else
  5039.   rm -rf conftest*
  5040.   eval "ac_cv_func_$ac_func=no"
  5041. fi
  5042. rm -f conftest*
  5043.  
  5044. fi
  5045. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  5046.   echo "$ac_t""yes" 1>&6
  5047.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  5048.   cat >> confdefs.h <<EOF
  5049. #define $ac_tr_func 1
  5050. EOF
  5051.  
  5052. else
  5053.   echo "$ac_t""no" 1>&6
  5054. fi
  5055. done
  5056.  
  5057.     for ac_hdr in rpc/pmap_clnt.h
  5058. do
  5059. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  5060. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  5061. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5062.   echo $ac_n "(cached) $ac_c" 1>&6
  5063. else
  5064.   cat > conftest.$ac_ext <<EOF
  5065. #line 5066 "configure"
  5066. #include "confdefs.h"
  5067. #include <$ac_hdr>
  5068. EOF
  5069. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5070. ac_err=`grep -v '^ *+' conftest.out`
  5071. if test -z "$ac_err"; then
  5072.   rm -rf conftest*
  5073.   eval "ac_cv_header_$ac_safe=yes"
  5074. else
  5075.   echo "$ac_err" >&5
  5076.   rm -rf conftest*
  5077.   eval "ac_cv_header_$ac_safe=no"
  5078. fi
  5079. rm -f conftest*
  5080. fi
  5081. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5082.   echo "$ac_t""yes" 1>&6
  5083.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  5084.   cat >> confdefs.h <<EOF
  5085. #define $ac_tr_hdr 1
  5086. EOF
  5087.  
  5088. else
  5089.   echo "$ac_t""no" 1>&6
  5090. fi
  5091. done
  5092.  
  5093.     vfs_flags="$vfs_flags, mcfs, ftpfs"
  5094.     NETFILES="\$(NETFILES)"
  5095.     use_net_code=true
  5096. fi
  5097.  
  5098.  
  5099. screen_manager=unknown
  5100. search_ncurses=false
  5101.  
  5102. CFLAGS=${CFLAGS--O}
  5103. LDFLAGS=${LDFLAGS--O}
  5104.  
  5105. mouse_lib="xterm only"
  5106. # Check whether --with-gpm-mouse or --without-gpm-mouse was given.
  5107. if test "${with_gpm_mouse+set}" = set; then
  5108.   withval="$with_gpm_mouse"
  5109.   if test x$withval = xyes
  5110.     then 
  5111.         echo "configure: warning: Usage is: --with-gpm-mouse=base-dir" 1>&2
  5112.     else
  5113.         LIBS="$LIBS -L$withval/lib -lgpm"
  5114.               cat >> confdefs.h <<\EOF
  5115. #define HAVE_LIBGPM 1
  5116. EOF
  5117.  
  5118.         CPPFLAGS="$CPPFLAGS -I$withval/include"
  5119.             mouse_lib="GPM and xterm"
  5120.         echo "$ac_t""defining use_gpm" 1>&6
  5121.     fi
  5122.  
  5123. fi
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132. XCURSES=""
  5133.  
  5134.  
  5135.  
  5136. # Check whether --with-sco or --without-sco was given.
  5137. if test "${with_sco+set}" = set; then
  5138.   withval="$with_sco"
  5139.   
  5140.     if test x$withval = xyes; then
  5141.         cat >> confdefs.h <<\EOF
  5142. #define SCO_FLAVOR 1
  5143. EOF
  5144.  
  5145.     fi
  5146.  
  5147. fi
  5148.  
  5149.  
  5150. # Check whether --with-sunos-curses or --without-sunos-curses was given.
  5151. if test "${with_sunos_curses+set}" = set; then
  5152.   withval="$with_sunos_curses"
  5153.   
  5154.     if test x$withval = xyes; then
  5155.         
  5156.     search_ncurses=false
  5157.     screen_manager="SunOS 4.x /usr/5include curses"
  5158.     echo "$ac_t""Using SunOS 4.x /usr/5include curses" 1>&6
  5159.     cat >> confdefs.h <<\EOF
  5160. #define SUNOS_CURSES 1
  5161. EOF
  5162.  
  5163.     cat >> confdefs.h <<\EOF
  5164. #define NO_COLOR_SUPPORT 1
  5165. EOF
  5166.  
  5167.     cat >> confdefs.h <<\EOF
  5168. #define USE_SYSV_CURSES 1
  5169. EOF
  5170.  
  5171.     CPPFLAGS="$CPPFLAGS -I/usr/5include"
  5172.     XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a"
  5173.     echo "$ac_t""Please note that some screen refreshs may fail" 1>&6
  5174.     echo "configure: warning: Reconsider using Slang" 1>&2
  5175.  
  5176.     fi
  5177.  
  5178. fi
  5179.  
  5180.  
  5181. # Check whether --with-osf1-curses or --without-osf1-curses was given.
  5182. if test "${with_osf1_curses+set}" = set; then
  5183.   withval="$with_osf1_curses"
  5184.   
  5185.     if test x$withval = xyes; then
  5186.         
  5187.        echo "$ac_t""Using OSF1 curses" 1>&6
  5188.        search_ncurses=false
  5189.        screen_manager="OSF1 curses"
  5190.        cat >> confdefs.h <<\EOF
  5191. #define NO_COLOR_SUPPORT 1
  5192. EOF
  5193.  
  5194.        cat >> confdefs.h <<\EOF
  5195. #define USE_SYSV_CURSES 1
  5196. EOF
  5197.  
  5198.        XCURSES="xcurses.o"
  5199.        LIBS="$LIBS -lcurses"
  5200.  
  5201.     fi
  5202.  
  5203. fi
  5204.  
  5205.  
  5206. # Check whether --with-vcurses or --without-vcurses was given.
  5207. if test "${with_vcurses+set}" = set; then
  5208.   withval="$with_vcurses"
  5209.   if test x$withval = xyes; then
  5210.         CPPFLAGS="$CPPFLAGS"
  5211.         else
  5212.         CPPFLAGS="$CPPFLAGS -I$withval"
  5213.     fi
  5214.     
  5215.     echo "$ac_t""Using SysV curses" 1>&6
  5216.     cat >> confdefs.h <<\EOF
  5217. #define USE_SYSV_CURSES 1
  5218. EOF
  5219.  
  5220.     XCURSES=""
  5221.     search_ncurses=false
  5222.     screen_manager="SysV/curses"
  5223.     LIBS="$LIBS -lcurses"
  5224.  
  5225.  
  5226. fi
  5227.  
  5228.             
  5229. # Check whether --with-ncurses or --without-ncurses was given.
  5230. if test "${with_ncurses+set}" = set; then
  5231.   withval="$with_ncurses"
  5232.   if test x$withval = xyes
  5233.     then
  5234.         search_ncurses=true
  5235.     else
  5236.         LIBS="$LIBS -L$withval/lib -lncurses"
  5237.         CPPFLAGS="$CPPFLAGS -I$withval/include"
  5238.         search_ncurses=false
  5239.         screen_manager="ncurses"
  5240.         cat >> confdefs.h <<\EOF
  5241. #define USE_NCURSES 1
  5242. EOF
  5243.  
  5244.     fi
  5245.  
  5246. fi
  5247.  
  5248.  
  5249.  
  5250.  
  5251. tkmc=""
  5252. tk_includes=""
  5253. tk_libs=""
  5254. if test x$no_x != xyes; then
  5255.     # Check whether --with-tk or --without-tk was given.
  5256. if test "${with_tk+set}" = set; then
  5257.   withval="$with_tk"
  5258.   
  5259.     if test x$withval = xyes; then
  5260.     tkmc="tkmc"
  5261.     fi
  5262. fi
  5263.  
  5264.     # Check whether --with-tk-includes or --without-tk-includes was given.
  5265. if test "${with_tk_includes+set}" = set; then
  5266.   withval="$with_tk_includes"
  5267.   
  5268.     if test x$withval = xyes; then
  5269.     echo "configure: warning: Usage is: --with-tk-includes=dir" 1>&2
  5270.     else
  5271.     if test x$withval = xno; then
  5272.         echo "configure: warning: Usage is: --with-tk-includes=dir" 1>&2
  5273.     else
  5274.         tk_includes="-I$withval"
  5275.         tkmc="tkmc"
  5276.     fi
  5277.     fi
  5278. fi
  5279.  
  5280.     # Check whether --with-tk-libraries or --without-tk-libraries was given.
  5281. if test "${with_tk_libraries+set}" = set; then
  5282.   withval="$with_tk_libraries"
  5283.   
  5284.     if test x$withval = xyes; then
  5285.     echo "configure: warning: Usage is: --with-tk-libraries=dir" 1>&2
  5286.     else
  5287.     if test x$withval = xno; then
  5288.         echo "configure: warning: Usage is: --with-tk-libraries=dir" 1>&2
  5289.     else
  5290.         tk_libs="-L$withval"
  5291.         tkmc="tkmc"
  5292.     fi
  5293.     fi
  5294. fi
  5295.  
  5296.     if test -n "$tkmc"; then 
  5297.         echo "checking for Tcl/Tk" 1>&6
  5298.         tk_headers_found=no
  5299.         if test ! -n "$tk_includes"; then
  5300.         ac_safe=`echo "tcl.h" | tr './\055' '___'`
  5301. echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
  5302. if eval "test \"`echo '$''{'ac_cv_header_in_path_$ac_safe'+set}'`\" = set"; then
  5303.   echo $ac_n "(cached) $ac_c" 1>&6
  5304. else
  5305.   cat > conftest.$ac_ext <<EOF
  5306. #line 5307 "configure"
  5307. #include "confdefs.h"
  5308. #include <tcl.h>
  5309. EOF
  5310. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5311. ac_err=`grep -v '^ *+' conftest.out`
  5312. if test -z "$ac_err"; then
  5313.   rm -rf conftest*
  5314.   ac_header_in_path=yes
  5315. else
  5316.   echo "$ac_err" >&5
  5317.   rm -rf conftest*
  5318.   
  5319.   ac_header_in_path_found=no
  5320.   for ac_header_in_path_value in $include_additional_path; do
  5321.     ac_in_path_save_CPPFLAGS=$CPPFLAGS
  5322.     CPPFLAGS="$CPPFLAGS -I$ac_header_in_path_value"
  5323.     cat > conftest.$ac_ext <<EOF
  5324. #line 5325 "configure"
  5325. #include "confdefs.h"
  5326. #include <tcl.h>
  5327. EOF
  5328. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5329. ac_err=`grep -v '^ *+' conftest.out`
  5330. if test -z "$ac_err"; then
  5331.   rm -rf conftest*
  5332.   
  5333. ac_header_in_path_found=yes
  5334. ac_header_in_path=$ac_header_in_path_value
  5335.  
  5336. else
  5337.   echo "$ac_err" >&5
  5338. fi
  5339. rm -f conftest*
  5340.     CPPFLAGS=$ac_in_path_save_CPPFLAGS
  5341.     if test x$ac_header_in_path_found = xyes; then
  5342.         break
  5343.     fi
  5344.   done
  5345.   if test $ac_header_in_path_found = xno; then
  5346.     ac_header_in_path=no
  5347.   fi
  5348.  
  5349. fi
  5350. rm -f conftest*
  5351.   eval "ac_cv_header_in_path_$ac_safe=$ac_header_in_path"
  5352.  
  5353. fi
  5354. eval "ac_header_in_path=`echo '$ac_cv_header_in_path_'$ac_safe`"
  5355. if test "$ac_header_in_path" = no; then
  5356.   echo "$ac_t""no" 1>&6
  5357. else
  5358.   if test -n "$ac_header_in_path"; then
  5359.       echo "$ac_t""$ac_header_in_path" 1>&6
  5360.   else
  5361.       echo "$ac_t""yes" 1>&6
  5362.   fi
  5363.   if test x$ac_header_in_path = xyes; then
  5364.       ac_header_in_path=
  5365.       eval "ac_cv_header_in_path_$ac_safe="
  5366.   fi
  5367.   
  5368.             ac_safe=`echo "tk.h" | tr './\055' '___'`
  5369. echo $ac_n "checking for tk.h""... $ac_c" 1>&6
  5370. if eval "test \"`echo '$''{'ac_cv_header_in_path_$ac_safe'+set}'`\" = set"; then
  5371.   echo $ac_n "(cached) $ac_c" 1>&6
  5372. else
  5373.   cat > conftest.$ac_ext <<EOF
  5374. #line 5375 "configure"
  5375. #include "confdefs.h"
  5376. #include <tk.h>
  5377. EOF
  5378. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5379. ac_err=`grep -v '^ *+' conftest.out`
  5380. if test -z "$ac_err"; then
  5381.   rm -rf conftest*
  5382.   ac_header_in_path=yes
  5383. else
  5384.   echo "$ac_err" >&5
  5385.   rm -rf conftest*
  5386.   
  5387.   ac_header_in_path_found=no
  5388.   for ac_header_in_path_value in $include_additional_path; do
  5389.     ac_in_path_save_CPPFLAGS=$CPPFLAGS
  5390.     CPPFLAGS="$CPPFLAGS -I$ac_header_in_path_value"
  5391.     cat > conftest.$ac_ext <<EOF
  5392. #line 5393 "configure"
  5393. #include "confdefs.h"
  5394. #include <tk.h>
  5395. EOF
  5396. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5397. ac_err=`grep -v '^ *+' conftest.out`
  5398. if test -z "$ac_err"; then
  5399.   rm -rf conftest*
  5400.   
  5401. ac_header_in_path_found=yes
  5402. ac_header_in_path=$ac_header_in_path_value
  5403.  
  5404. else
  5405.   echo "$ac_err" >&5
  5406. fi
  5407. rm -f conftest*
  5408.     CPPFLAGS=$ac_in_path_save_CPPFLAGS
  5409.     if test x$ac_header_in_path_found = xyes; then
  5410.         break
  5411.     fi
  5412.   done
  5413.   if test $ac_header_in_path_found = xno; then
  5414.     ac_header_in_path=no
  5415.   fi
  5416.  
  5417. fi
  5418. rm -f conftest*
  5419.   eval "ac_cv_header_in_path_$ac_safe=$ac_header_in_path"
  5420.  
  5421. fi
  5422. eval "ac_header_in_path=`echo '$ac_cv_header_in_path_'$ac_safe`"
  5423. if test "$ac_header_in_path" = no; then
  5424.   echo "$ac_t""no" 1>&6
  5425. else
  5426.   if test -n "$ac_header_in_path"; then
  5427.       echo "$ac_t""$ac_header_in_path" 1>&6
  5428.   else
  5429.       echo "$ac_t""yes" 1>&6
  5430.   fi
  5431.   if test x$ac_header_in_path = xyes; then
  5432.       ac_header_in_path=
  5433.       eval "ac_cv_header_in_path_$ac_safe="
  5434.   fi
  5435.   
  5436.             tk_headers_found=yes
  5437.             if test -n "$ac_cv_header_in_path_tcl_h"; then
  5438.             tk_includes="-I$ac_cv_header_in_path_tcl_h";
  5439.             fi
  5440.             if test -n "$ac_cv_header_in_path_tk_h"; then
  5441.             if test "$ac_cv_header_in_path_tk_h" != "$ac_cv_header_in_path_tcl_h"; then
  5442.                 tk_includes="$tk_includes -I$ac_cv_header_in_path_tk_h" 
  5443.             fi
  5444.             fi
  5445.             
  5446. fi
  5447.  
  5448.         
  5449. fi
  5450.  
  5451.         else
  5452.         tk_headers_found=yes
  5453.         fi
  5454.         if test $tk_headers_found = no; then
  5455.         tkmc=""
  5456.         else
  5457.         tk_libs_found=no
  5458.         ac_save_tk_LIBS="$LIBS"
  5459.         ac_save_tk_LDFLAGS="$LDFLAGS"
  5460.         LIBS="$X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS"
  5461.         LDFLAGS="$LDFLAGS $X_LIBS"
  5462.             if test ! -n "$tk_libs"; then
  5463.         echo $ac_n "checking for -ltcl""... $ac_c" 1>&6
  5464. ac_lib_var=`echo tcl | tr '.-/+' '___p'`
  5465. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5466.   echo $ac_n "(cached) $ac_c" 1>&6
  5467. else
  5468.   ac_save_LIBS="$LIBS"
  5469. LIBS="-ltcl -lm $LIBS"
  5470. cat > conftest.$ac_ext <<EOF
  5471. #line 5472 "configure"
  5472. #include "confdefs.h"
  5473.  
  5474. int main() { return 0; }
  5475. int t() {
  5476. Tcl_Eval()
  5477. ; return 0; }
  5478. EOF
  5479. if eval $ac_link; then
  5480.   rm -rf conftest*
  5481.   eval "ac_cv_lib_$ac_lib_var=yes"
  5482. else
  5483.   rm -rf conftest*
  5484.   eval "ac_cv_lib_$ac_lib_var=no"
  5485. fi
  5486. rm -f conftest*
  5487. LIBS="$ac_save_LIBS"
  5488.  
  5489. fi
  5490. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5491.   echo "$ac_t""yes" 1>&6
  5492.   
  5493.             echo $ac_n "checking for -ltk""... $ac_c" 1>&6
  5494. ac_lib_var=`echo tk | tr '.-/+' '___p'`
  5495. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5496.   echo $ac_n "(cached) $ac_c" 1>&6
  5497. else
  5498.   ac_save_LIBS="$LIBS"
  5499. LIBS="-ltk -ltcl -lm $LIBS"
  5500. cat > conftest.$ac_ext <<EOF
  5501. #line 5502 "configure"
  5502. #include "confdefs.h"
  5503.  
  5504. int main() { return 0; }
  5505. int t() {
  5506. Tk_CreateWindow()
  5507. ; return 0; }
  5508. EOF
  5509. if eval $ac_link; then
  5510.   rm -rf conftest*
  5511.   eval "ac_cv_lib_$ac_lib_var=yes"
  5512. else
  5513.   rm -rf conftest*
  5514.   eval "ac_cv_lib_$ac_lib_var=no"
  5515. fi
  5516. rm -f conftest*
  5517. LIBS="$ac_save_LIBS"
  5518.  
  5519. fi
  5520. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5521.   echo "$ac_t""yes" 1>&6
  5522.   
  5523.             tk_libs_found=yes
  5524.             
  5525. else
  5526.   echo "$ac_t""no" 1>&6
  5527. fi
  5528.  
  5529.         
  5530. else
  5531.   echo "$ac_t""no" 1>&6
  5532. fi
  5533.  
  5534.         else
  5535.         tk_libs_found=yes
  5536.         fi
  5537.         LDFLAGS="$ac_save_tk_LDFLAGS"
  5538.         LIBS="$ac_save_tk_LIBS"
  5539.         if test $tk_libs_found = no; then
  5540.         tkmc=""
  5541.         fi
  5542.     fi
  5543.     fi
  5544. fi
  5545. if test -n "$tkmc"; then
  5546.     
  5547.         if test x$xvers = xnone; then
  5548.             xvers="Tk"
  5549.         else
  5550.                xvers="XView and Tk"
  5551.         fi
  5552.  
  5553.     tkdep="tkdep"
  5554. else
  5555.     tkdep=""
  5556. fi
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562. # Extract the first word of "nroff", so it can be a program name with args.
  5563. set dummy nroff; ac_word=$2
  5564. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5565. if eval "test \"`echo '$''{'ac_cv_prog_HAVE_nroff'+set}'`\" = set"; then
  5566.   echo $ac_n "(cached) $ac_c" 1>&6
  5567. else
  5568.   if test -n "$HAVE_nroff"; then
  5569.   ac_cv_prog_HAVE_nroff="$HAVE_nroff" # Let the user override the test.
  5570. else
  5571.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  5572.   for ac_dir in $PATH; do
  5573.     test -z "$ac_dir" && ac_dir=.
  5574.     if test -f $ac_dir/$ac_word; then
  5575.       ac_cv_prog_HAVE_nroff="true"
  5576.       break
  5577.     fi
  5578.   done
  5579.   IFS="$ac_save_ifs"
  5580.   test -z "$ac_cv_prog_HAVE_nroff" && ac_cv_prog_HAVE_nroff="false"
  5581. fi
  5582. fi
  5583. HAVE_nroff="$ac_cv_prog_HAVE_nroff"
  5584. if test -n "$HAVE_nroff"; then
  5585.   echo "$ac_t""$HAVE_nroff" 1>&6
  5586. else
  5587.   echo "$ac_t""no" 1>&6
  5588. fi
  5589.  
  5590. if $HAVE_nroff; then
  5591.     echo $ac_n "checking for manual formatting macros""... $ac_c" 1>&6
  5592.     if eval "test \"`echo '$''{'ac_cv_mandoc'+set}'`\" = set"; then
  5593.   echo $ac_n "(cached) $ac_c" 1>&6
  5594. else
  5595.   
  5596.     nroff -mandoc < /dev/null > /dev/null 2>&1 /dev/null
  5597.     if test $? = 0
  5598.     then
  5599.     ac_cv_mandoc=-mandoc
  5600.     else
  5601.     ac_cv_mandoc=-man
  5602.     fi
  5603.     
  5604. fi
  5605.  
  5606.     MANDOC=$ac_cv_mandoc
  5607.     echo "$ac_t""$MANDOC" 1>&6
  5608. else
  5609.     MANDOC=-man
  5610. fi
  5611.  
  5612.  
  5613. if $HAVE_nroff; then
  5614.     echo $ac_n "checking If nroff accepts -Tascii""... $ac_c" 1>&6
  5615.     if eval "test \"`echo '$''{'ac_cv_nroff_tascii'+set}'`\" = set"; then
  5616.   echo $ac_n "(cached) $ac_c" 1>&6
  5617. else
  5618.   
  5619.     nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
  5620.     if test $? = 0
  5621.     then
  5622.     ac_cv_nroff_tascii=" -Tascii"
  5623.         echo "$ac_t""yes" 1>&6
  5624.     else
  5625.     ac_cv_nroff_tascii=""
  5626.         echo "$ac_t""no" 1>&6
  5627.     fi
  5628.     
  5629. fi
  5630.  
  5631. fi
  5632. TROFFASCII="$ac_cv_nroff_tascii"
  5633.  
  5634.  
  5635. # Extract the first word of "file", so it can be a program name with args.
  5636. set dummy file; ac_word=$2
  5637. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  5638. if eval "test \"`echo '$''{'ac_cv_prog_HAVE_FILECMD'+set}'`\" = set"; then
  5639.   echo $ac_n "(cached) $ac_c" 1>&6
  5640. else
  5641.   if test -n "$HAVE_FILECMD"; then
  5642.   ac_cv_prog_HAVE_FILECMD="$HAVE_FILECMD" # Let the user override the test.
  5643. else
  5644.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  5645.   for ac_dir in $PATH; do
  5646.     test -z "$ac_dir" && ac_dir=.
  5647.     if test -f $ac_dir/$ac_word; then
  5648.       ac_cv_prog_HAVE_FILECMD="true"
  5649.       break
  5650.     fi
  5651.   done
  5652.   IFS="$ac_save_ifs"
  5653.   test -z "$ac_cv_prog_HAVE_FILECMD" && ac_cv_prog_HAVE_FILECMD="false"
  5654. fi
  5655. fi
  5656. HAVE_FILECMD="$ac_cv_prog_HAVE_FILECMD"
  5657. if test -n "$HAVE_FILECMD"; then
  5658.   echo "$ac_t""$HAVE_FILECMD" 1>&6
  5659. else
  5660.   echo "$ac_t""no" 1>&6
  5661. fi
  5662.  
  5663. if $HAVE_FILECMD; then
  5664.     echo $ac_n "checking for - option to file command""... $ac_c" 1>&6
  5665.     if eval "test \"`echo '$''{'ac_cv_filestdin'+set}'`\" = set"; then
  5666.   echo $ac_n "(cached) $ac_c" 1>&6
  5667. else
  5668.   
  5669.     cat > conftest.c <<EOF
  5670. /* A comment */
  5671. #if 0
  5672. #endif
  5673. void main(void)
  5674. { return; }
  5675. EOF
  5676.     
  5677.     cat > conftest.sed <<EOF
  5678. s/^[^:]*:[\ \    ]*//
  5679. s/[\ \    ]*$//
  5680. EOF
  5681.     filehyphen_1=`file conftest.c 2>/dev/null | sed -f conftest.sed`
  5682.     filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed`
  5683.     if test "$filehyphen_1" = "$filehyphen_2"; then
  5684.     ac_cv_filestdin=yes
  5685.     else
  5686.     ac_cv_filestdin=no
  5687.     fi
  5688.     
  5689.     rm conftest.c conftest.sed
  5690.     unset filehyphen_1
  5691.     unset filehyphen_2
  5692.     
  5693. fi
  5694.  
  5695.  
  5696.     if test x$ac_cv_filestdin = xyes; then
  5697.     cat >> confdefs.h <<\EOF
  5698. #define FILE_STDIN 1
  5699. EOF
  5700.  
  5701.     fi
  5702.     filestdin=$ac_cv_filestdin
  5703.     echo "$ac_t""$filestdin" 1>&6
  5704.  
  5705.             
  5706. echo $ac_n "checking for -L option to file command""... $ac_c" 1>&6
  5707. if eval "test \"`echo '$''{'ac_cv_filel'+set}'`\" = set"; then
  5708.   echo $ac_n "(cached) $ac_c" 1>&6
  5709. else
  5710.   
  5711. file -L . > /dev/null 2>&1
  5712. if test $? = 0
  5713. then
  5714.     ac_cv_filel=yes
  5715. else
  5716.     ac_cv_filel=no
  5717. fi
  5718.  
  5719. fi
  5720.  
  5721. if test x$ac_cv_filel = xyes; then
  5722.     cat >> confdefs.h <<\EOF
  5723. #define FILE_L 1
  5724. EOF
  5725.  
  5726. fi
  5727. filel=$ac_cv_filel
  5728. echo "$ac_t""$filel" 1>&6
  5729. fi 
  5730.  
  5731. have_dusum=yes
  5732. echo $ac_n "checking for du arguments""... $ac_c" 1>&6
  5733. # Check whether --with-dusum or --without-dusum was given.
  5734. if test "${with_dusum+set}" = set; then
  5735.   withval="$with_dusum"
  5736.   
  5737.     if test x$withval = xno; then
  5738.         have_dusum=no
  5739.     fi
  5740.  
  5741. fi
  5742.  
  5743. if test x$have_dusum = xyes; then
  5744.     cat >> confdefs.h <<\EOF
  5745. #define HAVE_DUSUM 1
  5746. EOF
  5747.  
  5748.     if eval "test \"`echo '$''{'ac_cv_dusum'+set}'`\" = set"; then
  5749.   echo $ac_n "(cached) $ac_c" 1>&6
  5750. else
  5751.   
  5752.     du -s -b $srcdir/configure >/dev/null 2>&1
  5753.     if test $? = 0; then
  5754.         ac_cv_dusum='dusum_useb=yes; dusum_factor=1'
  5755.     else
  5756.     ac_cv_dusum='dusum_useb=; dusum_factor=512'
  5757.     fi
  5758.  
  5759. fi
  5760.  
  5761.     eval "$ac_cv_dusum"
  5762.     if test x$dusum_useb = xyes; then
  5763.     cat >> confdefs.h <<\EOF
  5764. #define DUSUM_USEB 1
  5765. EOF
  5766.  
  5767.     echo "$ac_t""-b" 1>&6
  5768.     else
  5769.     echo "$ac_t""block size $dusum_factor" 1>&6
  5770.     fi
  5771.     cat >> confdefs.h <<EOF
  5772. #define DUSUM_FACTOR $dusum_factor
  5773. EOF
  5774.  
  5775. fi
  5776.  
  5777. termnet=false
  5778. # Check whether --with-termnet or --without-termnet was given.
  5779. if test "${with_termnet+set}" = set; then
  5780.   withval="$with_termnet"
  5781.   
  5782.     if test x$withval = xyes; then
  5783.         cat >> confdefs.h <<\EOF
  5784. #define USE_TERMNET 1
  5785. EOF
  5786.  
  5787.         termnet=true        
  5788.     fi
  5789.  
  5790. fi
  5791.  
  5792.  
  5793.  
  5794. echo $ac_n "checking for subshell support""... $ac_c" 1>&6
  5795. # Check whether --with-subshell or --without-subshell was given.
  5796. if test "${with_subshell+set}" = set; then
  5797.   withval="$with_subshell"
  5798.   if test x$withval = xoptional
  5799.     then
  5800.         cat >> confdefs.h <<\EOF
  5801. #define SUBSHELL_OPTIONAL 1
  5802. EOF
  5803.  
  5804.         cat >> confdefs.h <<\EOF
  5805. #define HAVE_SUBSHELL_SUPPORT 1
  5806. EOF
  5807.  
  5808.         result="optional"
  5809.     fi
  5810.     if test x$withval = xyes
  5811.         then 
  5812.         cat >> confdefs.h <<\EOF
  5813. #define HAVE_SUBSHELL_SUPPORT 1
  5814. EOF
  5815.  
  5816.         result="yes"
  5817.     fi
  5818. else
  5819.       if test $system = ULTRIX    
  5820.     then
  5821.         result=no
  5822.     else
  5823.         cat >> confdefs.h <<\EOF
  5824. #define HAVE_SUBSHELL_SUPPORT 1
  5825. EOF
  5826.  
  5827.         result=yes
  5828.     fi
  5829.  
  5830. fi
  5831.  
  5832. echo "$ac_t""$result" 1>&6
  5833. subshell="$result"
  5834.  
  5835. if test x$GCC = x
  5836. then
  5837.     cat >> confdefs.h <<\EOF
  5838. #define OLD_TOOLS 1
  5839. EOF
  5840.  
  5841.     CPPFLAGS="$CPPFLAGS -Dinline="
  5842. fi
  5843.  
  5844. mem_debug="none"
  5845. # Check whether --with-debug or --without-debug was given.
  5846. if test "${with_debug+set}" = set; then
  5847.   withval="$with_debug"
  5848.   if test x$withval = xyes; then
  5849.     CFLAGS="$CFLAGS -Wall"
  5850.     mem_debug="Janne's MAD library"
  5851.     cat >> confdefs.h <<\EOF
  5852. #define HAVE_MAD 1
  5853. EOF
  5854.  
  5855.     cat >> confdefs.h <<\EOF
  5856. #define MCDEBUG 1
  5857. EOF
  5858.  
  5859.     if  echo `uname -s -r` | grep -q 'SunOS 4.1' 
  5860.     then
  5861.             CFLAGS="$CFLAGS -Wno-implicit"
  5862.         fi
  5863.     if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
  5864.         :
  5865.     else
  5866.         if test $cc_uses_g = yes; then
  5867.         CFLAGS="$CFLAGS -g"
  5868.         fi
  5869.     fi
  5870.     echo "$ac_t""compiling with -Wall and the memory leak detector" 1>&6
  5871. fi
  5872. fi
  5873.  
  5874.  
  5875. # Check whether --with-efence or --without-efence was given.
  5876. if test "${with_efence+set}" = set; then
  5877.   withval="$with_efence"
  5878.   if test x$withval = xyes; then
  5879.     CFLAGS="$CFLAGS -Wall"
  5880.     cat >> confdefs.h <<\EOF
  5881. #define MCDEBUG 1
  5882. EOF
  5883.  
  5884.     LIBS="$LIBS -lefence"
  5885.     if  echo `uname -s -r` | grep -q 'SunOS 4.1' 
  5886.     then
  5887.             CFLAGS="$CFLAGS -Wno-implicit"
  5888.         fi
  5889.     if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
  5890.         :
  5891.     else
  5892.         if test $cc_uses_g = yes; then
  5893.         CFLAGS="$CFLAGS -g"
  5894.         fi
  5895.     fi
  5896.     echo "$ac_t""compiling with -Wall and Electric fence" 1>&6
  5897.     mem_debug="Electric Fence"
  5898. fi
  5899. fi
  5900.  
  5901.  
  5902. # Check whether --with-mmap or --without-mmap was given.
  5903. if test "${with_mmap+set}" = set; then
  5904.   withval="$with_mmap"
  5905.   if test x$withval = xyes; then
  5906.     cat >> confdefs.h <<\EOF
  5907. #define HAVE_MMAP 1
  5908. EOF
  5909.  
  5910.         echo "$ac_t""forcing MMAP support" 1>&6
  5911. fi
  5912. fi
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.     
  5919. slang_check_lib=true
  5920. slang_term=""
  5921. # Check whether --with-terminfo or --without-terminfo was given.
  5922. if test "${with_terminfo+set}" = set; then
  5923.   withval="$with_terminfo"
  5924.   
  5925.     cat >> confdefs.h <<\EOF
  5926. #define SLANG_TERMINFO 1
  5927. EOF
  5928.  
  5929.     echo "$ac_t""Using SLang screen manager/terminfo" 1>&6
  5930.     slang_term=" with terminfo"
  5931.  
  5932.     slang_check_lib=false
  5933.     
  5934.  
  5935. fi
  5936.  
  5937.  
  5938. # Check whether --with-termcap or --without-termcap was given.
  5939. if test "${with_termcap+set}" = set; then
  5940.   withval="$with_termcap"
  5941.   
  5942.     echo "$ac_t""Using SLang screen manager/termcap" 1>&6
  5943.     cat >> confdefs.h <<\EOF
  5944. #define USE_TERMCAP 1
  5945. EOF
  5946.  
  5947.     LIBS="$LIBS -ltermcap"
  5948.     slang_term=" with termcap"
  5949.  
  5950.     slang_check_lib=false
  5951.     
  5952.  
  5953. fi
  5954.  
  5955.  
  5956.  
  5957.  
  5958. LIBSLANG=""
  5959. LSLANG=""
  5960. fastdepslang=""
  5961. # Check whether --with-slang or --without-slang was given.
  5962. if test "${with_slang+set}" = set; then
  5963.   withval="$with_slang"
  5964.   
  5965.     if test x$withval = xyes; then
  5966.         cat >> confdefs.h <<\EOF
  5967. #define HAVE_SLANG 1
  5968. EOF
  5969.  
  5970.     CPPFLAGS="$CPPFLAGS -I\$(slangdir)"
  5971.     LIBSLANG="libmcslang.a"
  5972.     search_ncurses=false
  5973.     screen_manager="SLang"
  5974.     LSLANG="-lmcslang"
  5975.     fastdepslang=fastdepslang
  5976.     if $slang_check_lib
  5977.     then
  5978.         use_terminfo=false
  5979.         if test -d /usr/lib/terminfo; then
  5980.         use_terminfo=true;
  5981.         fi
  5982.         if test -d /usr/share/lib/terminfo; then
  5983.         use_terminfo=true;
  5984.         fi
  5985.         if test -d /usr/local/lib/terminfo; then
  5986.         use_terminfo=true;
  5987.         fi
  5988.         if test -d /lib/terminfo; then
  5989.         use_terminfo=true;
  5990.         fi
  5991.         if $use_terminfo; then
  5992.         cat >> confdefs.h <<\EOF
  5993. #define SLANG_TERMINFO 1
  5994. EOF
  5995.  
  5996.     echo "$ac_t""Using SLang screen manager/terminfo" 1>&6
  5997.     slang_term=" with terminfo"
  5998.  
  5999.         else
  6000.         echo "$ac_t""Using SLang screen manager/termcap" 1>&6
  6001.     cat >> confdefs.h <<\EOF
  6002. #define USE_TERMCAP 1
  6003. EOF
  6004.  
  6005.     LIBS="$LIBS -ltermcap"
  6006.     slang_term=" with termcap"
  6007.  
  6008.         fi
  6009.         fi
  6010.  
  6011.     fi
  6012.  
  6013. fi
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.  
  6020. TERMNET=""
  6021.  
  6022.  
  6023.  
  6024. LIBVFS=""
  6025. LVFS=""
  6026. fastdepvfs=""
  6027. mcserv=""
  6028. vfs_type="normal"
  6029. # Check whether --with-vfs or --without-vfs was given.
  6030. if test "${with_vfs+set}" = set; then
  6031.   withval="$with_vfs"
  6032.   if test x$withval = xyes
  6033.     then 
  6034.         
  6035.     cat >> confdefs.h <<\EOF
  6036. #define USE_VFS 1
  6037. EOF
  6038.  
  6039.     if $use_net_code; then
  6040.         cat >> confdefs.h <<\EOF
  6041. #define USE_NETCODE 1
  6042. EOF
  6043.  
  6044.         fi
  6045.     LIBVFS="libvfs.a"
  6046.     LVFS="-lvfs"
  6047.     fastdepvfs=fastdepvfs
  6048.     if test $have_socket = yes; then
  6049.         mcserv="mcserv"
  6050.         if $termnet; then
  6051.         TERMNET="-ltermnet"
  6052.         fi
  6053.         fi
  6054.     CPPFLAGS="$CPPFLAGS -I\$(vfsdir)"
  6055.     echo "$ac_t""Using the VFS switch code" 1>&6
  6056.     vfs_type="Midnight Commander Virtual File System"
  6057.  
  6058.     else
  6059.         vfs_flags=""
  6060.     fi
  6061. else
  6062.       
  6063.     cat >> confdefs.h <<\EOF
  6064. #define USE_VFS 1
  6065. EOF
  6066.  
  6067.     if $use_net_code; then
  6068.         cat >> confdefs.h <<\EOF
  6069. #define USE_NETCODE 1
  6070. EOF
  6071.  
  6072.         fi
  6073.     LIBVFS="libvfs.a"
  6074.     LVFS="-lvfs"
  6075.     fastdepvfs=fastdepvfs
  6076.     if test $have_socket = yes; then
  6077.         mcserv="mcserv"
  6078.         if $termnet; then
  6079.         TERMNET="-ltermnet"
  6080.         fi
  6081.         fi
  6082.     CPPFLAGS="$CPPFLAGS -I\$(vfsdir)"
  6083.     echo "$ac_t""Using the VFS switch code" 1>&6
  6084.     vfs_type="Midnight Commander Virtual File System"
  6085.     
  6086.  
  6087. fi
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094. # Check whether --with-netrc or --without-netrc was given.
  6095. if test "${with_netrc+set}" = set; then
  6096.   withval="$with_netrc"
  6097.   
  6098.     cat >> confdefs.h <<\EOF
  6099. #define USE_NETRC 1
  6100. EOF
  6101.  
  6102.     echo "$ac_t""ftpfs will have .netrc parsing code" 1>&6
  6103.  
  6104. fi
  6105.  
  6106.  
  6107. undelfs_o=""
  6108. # Check whether --with-ext2undel or --without-ext2undel was given.
  6109. if test "${with_ext2undel+set}" = set; then
  6110.   withval="$with_ext2undel"
  6111.   
  6112.     cat >> confdefs.h <<\EOF
  6113. #define USE_EXT2FSLIB 1
  6114. EOF
  6115.  
  6116.     echo "$ac_t""With ext2fs file recovery code" 1>&6
  6117.     vfs_flags="$vfs_flags, undel-fs"
  6118.     undelfs_o="undelfs.o"
  6119.     LIBS="$LIBS -lext2fs -lcom_err"
  6120.  
  6121. fi
  6122.  
  6123.  
  6124.     
  6125.  
  6126.  
  6127. if $search_ncurses
  6128. then
  6129.     echo "checking "location of ncurses.h file"" 1>&6
  6130.  
  6131.     
  6132.     if $search_ncurses
  6133.     then
  6134.         if test -f /usr/include/ncurses.h
  6135.     then
  6136.         echo "$ac_t""Found ncurses on /usr/include/ncurses.h" 1>&6
  6137.          LIBS="$LIBS -lncurses"
  6138.         CPPFLAGS="$CPPFLAGS "
  6139.         search_ncurses=false
  6140.         screen_manager="ncurses on /usr/include"
  6141.         cat >> confdefs.h <<\EOF
  6142. #define USE_NCURSES 1
  6143. EOF
  6144.  
  6145.     fi
  6146.     fi
  6147.  
  6148.     
  6149.     if $search_ncurses
  6150.     then
  6151.         if test -f /usr/include/ncurses/ncurses.h
  6152.     then
  6153.         echo "$ac_t""Found ncurses on /usr/include/ncurses/ncurses.h" 1>&6
  6154.          LIBS="$LIBS -lncurses"
  6155.         CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
  6156.         search_ncurses=false
  6157.         screen_manager="ncurses on /usr/include/ncurses"
  6158.         cat >> confdefs.h <<\EOF
  6159. #define USE_NCURSES 1
  6160. EOF
  6161.  
  6162.     fi
  6163.     fi
  6164.  
  6165.     
  6166.     if $search_ncurses
  6167.     then
  6168.         if test -f /usr/local/include/ncurses.h
  6169.     then
  6170.         echo "$ac_t""Found ncurses on /usr/local/include/ncurses.h" 1>&6
  6171.          LIBS="$LIBS -lncurses -L/usr/local/lib"
  6172.         CPPFLAGS="$CPPFLAGS -I/usr/local/include"
  6173.         search_ncurses=false
  6174.         screen_manager="ncurses on /usr/local"
  6175.         cat >> confdefs.h <<\EOF
  6176. #define USE_NCURSES 1
  6177. EOF
  6178.  
  6179.     fi
  6180.     fi
  6181.  
  6182.     
  6183.     if $search_ncurses
  6184.     then
  6185.         if test -f /usr/local/include/ncurses/ncurses.h
  6186.     then
  6187.         echo "$ac_t""Found ncurses on /usr/local/include/ncurses/ncurses.h" 1>&6
  6188.          LIBS="$LIBS -lncurses -L/usr/local/lib -L/usr/local/lib/ncurses"
  6189.         CPPFLAGS="$CPPFLAGS -I/usr/local/include/ncurses"
  6190.         search_ncurses=false
  6191.         screen_manager="ncurses on /usr/local/include/ncurses"
  6192.         cat >> confdefs.h <<\EOF
  6193. #define USE_NCURSES 1
  6194. EOF
  6195.  
  6196.     fi
  6197.     fi
  6198.  
  6199.  
  6200.     
  6201.     if $search_ncurses
  6202.     then
  6203.         if test -f /usr/local/include/ncurses/curses.h
  6204.     then
  6205.         echo "$ac_t""Found ncurses on /usr/local/include/ncurses/curses.h" 1>&6
  6206.          LIBS="$LIBS -lncurses -L/usr/local/lib"
  6207.         CPPFLAGS="$CPPFLAGS -I/usr/local/include/ncurses -DRENAMED_NCURSES"
  6208.         search_ncurses=false
  6209.         screen_manager="renamed ncurses on /usr/local/.../ncurses"
  6210.         cat >> confdefs.h <<\EOF
  6211. #define USE_NCURSES 1
  6212. EOF
  6213.  
  6214.     fi
  6215.     fi
  6216.  
  6217.  
  6218.     
  6219.     if $search_ncurses
  6220.     then
  6221.         if test -f /usr/include/ncurses/curses.h
  6222.     then
  6223.         echo "$ac_t""Found ncurses on /usr/include/ncurses/curses.h" 1>&6
  6224.          LIBS="$LIBS -lncurses"
  6225.         CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses -DRENAMED_NCURSES"
  6226.         search_ncurses=false
  6227.         screen_manager="renamed ncurses on /usr/include/ncurses"
  6228.         cat >> confdefs.h <<\EOF
  6229. #define USE_NCURSES 1
  6230. EOF
  6231.  
  6232.     fi
  6233.     fi
  6234.  
  6235.  
  6236.                 if $search_ncurses 
  6237.     then
  6238.         cat > conftest.$ac_ext <<EOF
  6239. #line 6240 "configure"
  6240. #include "confdefs.h"
  6241. #include </usr/include/curses.h>
  6242. EOF
  6243. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  6244.   egrep "init_color" >/dev/null 2>&1; then
  6245.   rm -rf conftest*
  6246.   
  6247.     echo "$ac_t""Using SysV curses" 1>&6
  6248.     cat >> confdefs.h <<\EOF
  6249. #define USE_SYSV_CURSES 1
  6250. EOF
  6251.  
  6252.     XCURSES=""
  6253.     search_ncurses=false
  6254.     screen_manager="SysV/curses"
  6255.     LIBS="$LIBS -lcurses"
  6256.  
  6257. fi
  6258. rm -f conftest*
  6259.  
  6260.     fi
  6261.  
  6262.                         if $search_ncurses
  6263.     then
  6264.     if test -f /usr/5include/curses.h
  6265.     then
  6266.         
  6267.     search_ncurses=false
  6268.     screen_manager="SunOS 4.x /usr/5include curses"
  6269.     echo "$ac_t""Using SunOS 4.x /usr/5include curses" 1>&6
  6270.     cat >> confdefs.h <<\EOF
  6271. #define SUNOS_CURSES 1
  6272. EOF
  6273.  
  6274.     cat >> confdefs.h <<\EOF
  6275. #define NO_COLOR_SUPPORT 1
  6276. EOF
  6277.  
  6278.     cat >> confdefs.h <<\EOF
  6279. #define USE_SYSV_CURSES 1
  6280. EOF
  6281.  
  6282.     CPPFLAGS="$CPPFLAGS -I/usr/5include"
  6283.     XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a"
  6284.     echo "$ac_t""Please note that some screen refreshs may fail" 1>&6
  6285.     echo "configure: warning: Reconsider using Slang" 1>&2
  6286.  
  6287.         fi
  6288.     fi
  6289. fi
  6290.  
  6291. if test "x$screen_manager" = "xunknown"; then
  6292.     cat >> confdefs.h <<\EOF
  6293. #define HAVE_SLANG 1
  6294. EOF
  6295.  
  6296.     CPPFLAGS="$CPPFLAGS -I\$(slangdir)"
  6297.     LIBSLANG="libmcslang.a"
  6298.     search_ncurses=false
  6299.     screen_manager="SLang"
  6300.     LSLANG="-lmcslang"
  6301.     fastdepslang=fastdepslang
  6302.     if $slang_check_lib
  6303.     then
  6304.         use_terminfo=false
  6305.         if test -d /usr/lib/terminfo; then
  6306.         use_terminfo=true;
  6307.         fi
  6308.         if test -d /usr/share/lib/terminfo; then
  6309.         use_terminfo=true;
  6310.         fi
  6311.         if test -d /usr/local/lib/terminfo; then
  6312.         use_terminfo=true;
  6313.         fi
  6314.         if test -d /lib/terminfo; then
  6315.         use_terminfo=true;
  6316.         fi
  6317.         if $use_terminfo; then
  6318.         cat >> confdefs.h <<\EOF
  6319. #define SLANG_TERMINFO 1
  6320. EOF
  6321.  
  6322.     echo "$ac_t""Using SLang screen manager/terminfo" 1>&6
  6323.     slang_term=" with terminfo"
  6324.  
  6325.         else
  6326.         echo "$ac_t""Using SLang screen manager/termcap" 1>&6
  6327.     cat >> confdefs.h <<\EOF
  6328. #define USE_TERMCAP 1
  6329. EOF
  6330.  
  6331.     LIBS="$LIBS -ltermcap"
  6332.     slang_term=" with termcap"
  6333.  
  6334.         fi
  6335.         fi
  6336.  
  6337. fi
  6338.  
  6339. saver=""
  6340. saver_target=""
  6341. vcs=""
  6342. install_saver="no"
  6343. if test $system = Linux
  6344. then
  6345.     saver="install.saver"
  6346.     saver_target="cons.saver"
  6347.     vcs="install.create_vcs"
  6348.     install_saver="yes"
  6349. fi
  6350.  
  6351.  
  6352.  
  6353.  
  6354.     SEDCMD="sed 's/-man/$MANDOC/'"
  6355.     SEDCMD2="sed 's%@prefix@%\$(prefix)%'"
  6356.  
  6357.  
  6358.  
  6359. if test x$no_xview = xyes; then
  6360.     :
  6361. else
  6362.     
  6363. echo $ac_n "checking for -lXpm""... $ac_c" 1>&6
  6364. if eval "test \"`echo '$''{'ac_cv_has_xpm'+set}'`\" = set"; then
  6365.   echo $ac_n "(cached) $ac_c" 1>&6
  6366. else
  6367.   
  6368.     ac_cv_has_xpm=no
  6369.     if test x$no_x = xyes; then
  6370.     :
  6371.     else
  6372.         has_xpm_save_LIBS=$LIBS
  6373.     LIBS="-lXpm $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS"
  6374.     has_xpm_save_LDFLAGS=$LDFLAGS
  6375.     LDFLAGS="$LDFLAGS $X_LIBS"
  6376.     has_xpm_save_CFLAGS=$CFLAGS
  6377.     CFLAGS="$CFLAGS $X_CFLAGS"
  6378.     cat > conftest.$ac_ext <<EOF
  6379. #line 6380 "configure"
  6380. #include "confdefs.h"
  6381.  
  6382. #include <X11/Xlib.h>
  6383. #include <X11/xpm.h>
  6384.  
  6385. int main() { return 0; }
  6386. int t() {
  6387. XpmLibraryVersion();
  6388. ; return 0; }
  6389. EOF
  6390. if eval $ac_link; then
  6391.   rm -rf conftest*
  6392.   ac_cv_has_xpm=yes
  6393. fi
  6394. rm -f conftest*
  6395.  
  6396.     CFLAGS="$has_xpm_save_CFLAGS"
  6397.     LDFLAGS="$has_xpm_save_LDFLAGS"
  6398.     LIBS="$has_xpm_save_LIBS"
  6399.     fi
  6400.  
  6401. fi
  6402.  
  6403. echo "$ac_t""$ac_cv_has_xpm" 1>&6
  6404.  
  6405.     
  6406. echo $ac_n "checking for X11 non-rectangular shape extension""... $ac_c" 1>&6
  6407. if eval "test \"`echo '$''{'ac_cv_has_shape'+set}'`\" = set"; then
  6408.   echo $ac_n "(cached) $ac_c" 1>&6
  6409. else
  6410.   
  6411.     ac_cv_has_shape=no
  6412.     if test x$no_x = xyes; then
  6413.     :
  6414.     else
  6415.         has_shape_save_LIBS=$LIBS
  6416.     LIBS="-lXext $X_EXTRA_LIBS -lX11 $X_PRE_LIBS $LIBS"
  6417.     has_shape_save_LDFLAGS=$LDFLAGS
  6418.     LDFLAGS="$LDFLAGS $X_LIBS"
  6419.     has_shape_save_CFLAGS=$CFLAGS
  6420.     CFLAGS="$CFLAGS $X_CFLAGS"
  6421.     cat > conftest.$ac_ext <<EOF
  6422. #line 6423 "configure"
  6423. #include "confdefs.h"
  6424.  
  6425. #include <X11/Xlib.h>
  6426. #include <X11/Xutil.h>
  6427. #include <X11/extensions/shape.h>
  6428.  
  6429. int main() { return 0; }
  6430. int t() {
  6431.  
  6432. Display *dpy = (Display *)NULL;
  6433. int a, b;
  6434. XShapeQueryVersion(dpy,&a,&b);
  6435.  
  6436. ; return 0; }
  6437. EOF
  6438. if eval $ac_link; then
  6439.   rm -rf conftest*
  6440.   ac_cv_has_shape=yes
  6441. fi
  6442. rm -f conftest*
  6443.  
  6444.     CFLAGS="$has_shape_save_CFLAGS"
  6445.     LDFLAGS="$has_shape_save_LDFLAGS"
  6446.     LIBS="$has_shape_save_LIBS"
  6447.     fi
  6448.  
  6449. fi
  6450.  
  6451. echo "$ac_t""$ac_cv_has_shape" 1>&6
  6452.  
  6453.     if test x$ac_cv_has_xpm = xyes; then
  6454.         if test x$ac_cv_has_shape = xyes; then
  6455.             cat >> confdefs.h <<\EOF
  6456. #define HAVE_XPM_SHAPE 1
  6457. EOF
  6458.  
  6459.         XPM_LIB=-lXpm
  6460.         XEXT_LIB=-lXext
  6461.         
  6462.         
  6463.         fi
  6464.     fi
  6465. fi
  6466.  
  6467. echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
  6468. ac_lib_var=`echo termcap | tr '.-/+' '___p'`
  6469. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6470.   echo $ac_n "(cached) $ac_c" 1>&6
  6471. else
  6472.   ac_save_LIBS="$LIBS"
  6473. LIBS="-ltermcap  $LIBS"
  6474. cat > conftest.$ac_ext <<EOF
  6475. #line 6476 "configure"
  6476. #include "confdefs.h"
  6477.  
  6478. int main() { return 0; }
  6479. int t() {
  6480. tgoto()
  6481. ; return 0; }
  6482. EOF
  6483. if eval $ac_link; then
  6484.   rm -rf conftest*
  6485.   eval "ac_cv_lib_$ac_lib_var=yes"
  6486. else
  6487.   rm -rf conftest*
  6488.   eval "ac_cv_lib_$ac_lib_var=no"
  6489. fi
  6490. rm -f conftest*
  6491. LIBS="$ac_save_LIBS"
  6492.  
  6493. fi
  6494. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6495.   echo "$ac_t""yes" 1>&6
  6496.   LIBS="$LIBS -ltermcap"
  6497. else
  6498.   echo "$ac_t""no" 1>&6
  6499. $LIBS
  6500. fi
  6501.  
  6502. echo $ac_n "checking for -lgpm""... $ac_c" 1>&6
  6503. ac_lib_var=`echo gpm | tr '.-/+' '___p'`
  6504. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6505.   echo $ac_n "(cached) $ac_c" 1>&6
  6506. else
  6507.   ac_save_LIBS="$LIBS"
  6508. LIBS="-lgpm $LIBS $LIBS"
  6509. cat > conftest.$ac_ext <<EOF
  6510. #line 6511 "configure"
  6511. #include "confdefs.h"
  6512.  
  6513. int main() { return 0; }
  6514. int t() {
  6515. Gpm_Repeat()
  6516. ; return 0; }
  6517. EOF
  6518. if eval $ac_link; then
  6519.   rm -rf conftest*
  6520.   eval "ac_cv_lib_$ac_lib_var=yes"
  6521. else
  6522.   rm -rf conftest*
  6523.   eval "ac_cv_lib_$ac_lib_var=no"
  6524. fi
  6525. rm -f conftest*
  6526. LIBS="$ac_save_LIBS"
  6527.  
  6528. fi
  6529. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6530.   echo "$ac_t""yes" 1>&6
  6531.   
  6532.     cat >> confdefs.h <<\EOF
  6533. #define HAVE_LIBGPM 1
  6534. EOF
  6535.  
  6536.         mouse_lib="GPM and xterm"
  6537.     LIBS="$LIBS -lgpm"
  6538. else
  6539.   echo "$ac_t""no" 1>&6
  6540.  
  6541.         if test $system = Linux
  6542.     then 
  6543.         echo "configure: warning: "libgpm.a is missing or older than 0.18"" 1>&2
  6544.         fi
  6545.         
  6546. fi
  6547.  
  6548.  
  6549. case $screen_manager in
  6550.     [Ss][Ll][Aa][Nn][Gg]*)
  6551.         echo $ac_n "checking for -lcurses""... $ac_c" 1>&6
  6552. ac_lib_var=`echo curses | tr '.-/+' '___p'`
  6553. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  6554.   echo $ac_n "(cached) $ac_c" 1>&6
  6555. else
  6556.   ac_save_LIBS="$LIBS"
  6557. LIBS="-lcurses  $LIBS"
  6558. cat > conftest.$ac_ext <<EOF
  6559. #line 6560 "configure"
  6560. #include "confdefs.h"
  6561.  
  6562. int main() { return 0; }
  6563. int t() {
  6564. setupterm()
  6565. ; return 0; }
  6566. EOF
  6567. if eval $ac_link; then
  6568.   rm -rf conftest*
  6569.   eval "ac_cv_lib_$ac_lib_var=yes"
  6570. else
  6571.   rm -rf conftest*
  6572.   eval "ac_cv_lib_$ac_lib_var=no"
  6573. fi
  6574. rm -f conftest*
  6575. LIBS="$ac_save_LIBS"
  6576.  
  6577. fi
  6578. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  6579.   echo "$ac_t""yes" 1>&6
  6580.   
  6581.             cat > conftest.$ac_ext <<EOF
  6582. #line 6583 "configure"
  6583. #include "confdefs.h"
  6584.  
  6585. #include <curses.h>
  6586. #include <term.h>
  6587. int main() { return 0; }
  6588. int t() {
  6589.  
  6590.    if (key_end == parm_insert_line)
  6591.      return 1;
  6592.    return 0;
  6593.  
  6594. ; return 0; }
  6595. EOF
  6596. if eval $ac_compile; then
  6597.   rm -rf conftest*
  6598.   
  6599.             LIBS="$LIBS -lcurses"
  6600.             cat >> confdefs.h <<\EOF
  6601. #define USE_SETUPTERM 1
  6602. EOF
  6603.  
  6604. fi
  6605. rm -f conftest*
  6606.  
  6607. else
  6608.   echo "$ac_t""no" 1>&6
  6609. fi
  6610.  
  6611.         ;;
  6612. esac
  6613.  
  6614. LIBS="$LIBS $posix_libs"
  6615.  
  6616. insticons=
  6617. if test "x$no_xview" != "xyes"; then
  6618.     insticons=install_icons
  6619. fi
  6620.  
  6621.  
  6622. CPPFLAGS="-I.. $CPPFLAGS"
  6623.  
  6624.  
  6625.  
  6626.  
  6627.  
  6628. ac_cv_make_with_percent_rules=no
  6629. if test x$ac_cv_prog_gnu_make = xyes; then
  6630.     MCFG='include ../Make.common'
  6631.     MCFGR='include ./Make.common'
  6632.     MCF=/dev/null
  6633.     PHONY='.PHONY:'
  6634.     DOTDEPEND='ifeq (.depend,$(wildcard .depend)) \
  6635. include .depend \
  6636. endif'
  6637.     WRITEDEP=":"
  6638.     ac_cv_make_with_percent_rules=yes
  6639. else
  6640.     MCFG=""
  6641.     MCFGR=""
  6642.     MCF=./Make.common
  6643.     PHONY='#'
  6644.     DOTDEPEND=""
  6645.     WRITEDEP='sed "/^. \*\*\*Dependencies\*\*\*/,/^. \*\*\*End of dependencies\*\*\*/d" < Makefile > Makefile.conf; { cat Makefile.conf; echo "# ***Dependencies***Do not edit***"; cat .depend; echo "# ***End of dependencies***" } > Makefile; $(RMF) Makefile.conf .depend'
  6646. fi
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654. if test x$ac_cv_make_with_percent_rules = xyes; then
  6655.     PCENTRULE=""
  6656. else
  6657.     PCENTRULE="#"
  6658. fi
  6659.  
  6660.  
  6661. trap '' 1 2 15
  6662. cat > confcache <<\EOF
  6663. # This file is a shell script that caches the results of configure
  6664. # tests run on this system so they can be shared between configure
  6665. # scripts and configure runs.  It is not useful on other systems.
  6666. # If it contains results you don't want to keep, you may remove or edit it.
  6667. #
  6668. # By default, configure uses ./config.cache as the cache file,
  6669. # creating it if it does not exist already.  You can give configure
  6670. # the --cache-file=FILE option to use a different cache file; that is
  6671. # what configure does when it calls configure scripts in
  6672. # subdirectories, so they share the cache.
  6673. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  6674. # config.status only pays attention to the cache file if you give it the
  6675. # --recheck option to rerun configure.
  6676. #
  6677. EOF
  6678. # Ultrix sh set writes to stderr and can't be redirected directly,
  6679. # and sets the high bit in the cache file unless we assign to the vars.
  6680. (set) 2>&1 |
  6681.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  6682.   >> confcache
  6683. if cmp -s $cache_file confcache; then
  6684.   :
  6685. else
  6686.   if test -w $cache_file; then
  6687.     echo "updating cache $cache_file"
  6688.     cat confcache > $cache_file
  6689.   else
  6690.     echo "not updating unwritable cache $cache_file"
  6691.   fi
  6692. fi
  6693. rm -f confcache
  6694.  
  6695. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  6696.  
  6697. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  6698. # Let make expand exec_prefix.
  6699. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  6700.  
  6701. # Any assignment to VPATH causes Sun make to only execute
  6702. # the first set of double-colon rules, so remove it if not needed.
  6703. # If there is a colon in the path, we need to keep it.
  6704. if test "x$srcdir" = x.; then
  6705.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  6706. fi
  6707.  
  6708. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  6709.  
  6710. DEFS=-DHAVE_CONFIG_H
  6711.  
  6712. # Without the "./", some shells look in PATH for config.status.
  6713. : ${CONFIG_STATUS=./config.status}
  6714.  
  6715. echo creating $CONFIG_STATUS
  6716. rm -f $CONFIG_STATUS
  6717. cat > $CONFIG_STATUS <<EOF
  6718. #! /bin/sh
  6719. # Generated automatically by configure.
  6720. # Run this file to recreate the current configuration.
  6721. # This directory was configured as follows,
  6722. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  6723. #
  6724. # $0 $ac_configure_args
  6725. #
  6726. # Compiler output produced by configure, useful for debugging
  6727. # configure, is in ./config.log if it exists.
  6728.  
  6729. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  6730. for ac_option
  6731. do
  6732.   case "\$ac_option" in
  6733.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  6734.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  6735.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  6736.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  6737.     echo "$CONFIG_STATUS generated by autoconf version 2.7"
  6738.     exit 0 ;;
  6739.   -help | --help | --hel | --he | --h)
  6740.     echo "\$ac_cs_usage"; exit 0 ;;
  6741.   *) echo "\$ac_cs_usage"; exit 1 ;;
  6742.   esac
  6743. done
  6744.  
  6745. ac_given_srcdir=$srcdir
  6746. ac_given_INSTALL="$INSTALL"
  6747.  
  6748. trap 'rm -fr `echo "Make.common Makefile doc/Makefile vfs/Makefile lib/Makefile lib/mc.ext tk/Makefile xv/Makefile src/Makefile slang/Makefile icons/Makefile mcfn_install config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  6749. EOF
  6750. cat >> $CONFIG_STATUS <<EOF
  6751.  
  6752. # Protect against being on the right side of a sed subst in config.status.
  6753. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  6754.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  6755. $ac_vpsub
  6756. $extrasub
  6757. s%@CFLAGS@%$CFLAGS%g
  6758. s%@CPPFLAGS@%$CPPFLAGS%g
  6759. s%@CXXFLAGS@%$CXXFLAGS%g
  6760. s%@DEFS@%$DEFS%g
  6761. s%@LDFLAGS@%$LDFLAGS%g
  6762. s%@LIBS@%$LIBS%g
  6763. s%@exec_prefix@%$exec_prefix%g
  6764. s%@prefix@%$prefix%g
  6765. s%@program_transform_name@%$program_transform_name%g
  6766. s%@bindir@%$bindir%g
  6767. s%@sbindir@%$sbindir%g
  6768. s%@libexecdir@%$libexecdir%g
  6769. s%@datadir@%$datadir%g
  6770. s%@sysconfdir@%$sysconfdir%g
  6771. s%@sharedstatedir@%$sharedstatedir%g
  6772. s%@localstatedir@%$localstatedir%g
  6773. s%@libdir@%$libdir%g
  6774. s%@includedir@%$includedir%g
  6775. s%@oldincludedir@%$oldincludedir%g
  6776. s%@infodir@%$infodir%g
  6777. s%@mandir@%$mandir%g
  6778. s%@MC@%$MC%g
  6779. s%@SET_MAKE@%$SET_MAKE%g
  6780. s%@CC@%$CC%g
  6781. s%@CPP@%$CPP%g
  6782. s%@RANLIB@%$RANLIB%g
  6783. s%@LN_S@%$LN_S%g
  6784. s%@AWK@%$AWK%g
  6785. s%@dep@%$dep%g
  6786. s%@GNU_MAKE@%$GNU_MAKE%g
  6787. s%@MV@%$MV%g
  6788. s%@CP@%$CP%g
  6789. s%@RM@%$RM%g
  6790. s%@CHMOD@%$CHMOD%g
  6791. s%@AR@%$AR%g
  6792. s%@system@%$system%g
  6793. s%@X11_WWW@%$X11_WWW%g
  6794. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  6795. s%@INSTALL_DATA@%$INSTALL_DATA%g
  6796. s%@REGEX_O@%$REGEX_O%g
  6797. s%@LIBOBJS@%$LIBOBJS%g
  6798. s%@SHADOWLIB@%$SHADOWLIB%g
  6799. s%@X_CFLAGS@%$X_CFLAGS%g
  6800. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  6801. s%@X_LIBS@%$X_LIBS%g
  6802. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  6803. s%@XVIEW_CFLAGS@%$XVIEW_CFLAGS%g
  6804. s%@XVIEW_LIBS@%$XVIEW_LIBS%g
  6805. s%@HAVE_XVIEW@%$HAVE_XVIEW%g
  6806. s%@HAVE_XVIEW_PRIVATE_HEADERS@%$HAVE_XVIEW_PRIVATE_HEADERS%g
  6807. s%@mxc@%$mxc%g
  6808. s%@xvdep@%$xvdep%g
  6809. s%@ac_my_xp@%$ac_my_xp%g
  6810. s%@xv_bindir@%$xv_bindir%g
  6811. s%@NETFILES@%$NETFILES%g
  6812. s%@XCURSES@%$XCURSES%g
  6813. s%@tkmc@%$tkmc%g
  6814. s%@tkdep@%$tkdep%g
  6815. s%@tk_includes@%$tk_includes%g
  6816. s%@tk_libs@%$tk_libs%g
  6817. s%@HAVE_nroff@%$HAVE_nroff%g
  6818. s%@MANDOC@%$MANDOC%g
  6819. s%@TROFFASCII@%$TROFFASCII%g
  6820. s%@HAVE_FILECMD@%$HAVE_FILECMD%g
  6821. s%@LIBSLANG@%$LIBSLANG%g
  6822. s%@LSLANG@%$LSLANG%g
  6823. s%@fastdepslang@%$fastdepslang%g
  6824. s%@TERMNET@%$TERMNET%g
  6825. s%@LIBVFS@%$LIBVFS%g
  6826. s%@LVFS@%$LVFS%g
  6827. s%@fastdepvfs@%$fastdepvfs%g
  6828. s%@mcserv@%$mcserv%g
  6829. s%@undelfs_o@%$undelfs_o%g
  6830. s%@saver_target@%$saver_target%g
  6831. s%@saver@%$saver%g
  6832. s%@vcs@%$vcs%g
  6833. s%@SEDCMD@%$SEDCMD%g
  6834. s%@SEDCMD2@%$SEDCMD2%g
  6835. s%@XPM_LIB@%$XPM_LIB%g
  6836. s%@XEXT_LIB@%$XEXT_LIB%g
  6837. s%@insticons@%$insticons%g
  6838. s%@PHONY@%$PHONY%g
  6839. s%@DOTDEPEND@%$DOTDEPEND%g
  6840. s%@WRITEDEP@%$WRITEDEP%g
  6841. s%@MCFG@%$MCFG%g
  6842. s%@MCFGR@%$MCFGR%g
  6843. /@MCF@/r $MCF
  6844. s%@MCF@%%g
  6845. s%@PCENTRULE@%$PCENTRULE%g
  6846.  
  6847. CEOF
  6848. EOF
  6849. cat >> $CONFIG_STATUS <<EOF
  6850.  
  6851. CONFIG_FILES=\${CONFIG_FILES-"Make.common Makefile doc/Makefile vfs/Makefile lib/Makefile lib/mc.ext tk/Makefile xv/Makefile src/Makefile slang/Makefile icons/Makefile mcfn_install"}
  6852. EOF
  6853. cat >> $CONFIG_STATUS <<\EOF
  6854. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  6855.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  6856.   case "$ac_file" in
  6857.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  6858.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  6859.   *) ac_file_in="${ac_file}.in" ;;
  6860.   esac
  6861.  
  6862.   # Adjust relative srcdir, etc. for subdirectories.
  6863.  
  6864.   # Remove last slash and all that follows it.  Not all systems have dirname.
  6865.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  6866.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  6867.     # The file is in a subdirectory.
  6868.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  6869.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  6870.     # A "../" for each directory in $ac_dir_suffix.
  6871.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  6872.   else
  6873.     ac_dir_suffix= ac_dots=
  6874.   fi
  6875.  
  6876.   case "$ac_given_srcdir" in
  6877.   .)  srcdir=.
  6878.       if test -z "$ac_dots"; then top_srcdir=.
  6879.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  6880.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  6881.   *) # Relative path.
  6882.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  6883.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  6884.   esac
  6885.  
  6886.   case "$ac_given_INSTALL" in
  6887.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  6888.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  6889.   esac
  6890.   echo creating "$ac_file"
  6891.   rm -f "$ac_file"
  6892.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  6893.   case "$ac_file" in
  6894.   *Makefile*) ac_comsub="1i\\
  6895. # $configure_input" ;;
  6896.   *) ac_comsub= ;;
  6897.   esac
  6898.   sed -e "$ac_comsub
  6899. s%@configure_input@%$configure_input%g
  6900. s%@srcdir@%$srcdir%g
  6901. s%@top_srcdir@%$top_srcdir%g
  6902. s%@INSTALL@%$INSTALL%g
  6903. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  6904. fi; done
  6905. rm -f conftest.subs
  6906.  
  6907. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  6908. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  6909. #
  6910. # ac_d sets the value in "#define NAME VALUE" lines.
  6911. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  6912. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  6913. ac_dC='\3'
  6914. ac_dD='%g'
  6915. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  6916. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  6917. ac_uB='\([     ]\)%\1#\2define\3'
  6918. ac_uC=' '
  6919. ac_uD='\4%g'
  6920. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  6921. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  6922. ac_eB='$%\1#\2define\3'
  6923. ac_eC=' '
  6924. ac_eD='%g'
  6925.  
  6926. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  6927. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  6928.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  6929.   case "$ac_file" in
  6930.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  6931.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  6932.   *) ac_file_in="${ac_file}.in" ;;
  6933.   esac
  6934.  
  6935.   echo creating $ac_file
  6936.  
  6937.   rm -f conftest.frag conftest.in conftest.out
  6938.   cp $ac_given_srcdir/$ac_file_in conftest.in
  6939.  
  6940. EOF
  6941.  
  6942. # Transform confdefs.h into a sed script conftest.vals that substitutes
  6943. # the proper values into config.h.in to produce config.h.  And first:
  6944. # Protect against being on the right side of a sed subst in config.status.
  6945. # Protect against being in an unquoted here document in config.status.
  6946. rm -f conftest.vals
  6947. cat > conftest.hdr <<\EOF
  6948. s/[\\&%]/\\&/g
  6949. s%[\\$`]%\\&%g
  6950. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  6951. s%ac_d%ac_u%gp
  6952. s%ac_u%ac_e%gp
  6953. EOF
  6954. sed -n -f conftest.hdr confdefs.h > conftest.vals
  6955. rm -f conftest.hdr
  6956.  
  6957. # This sed command replaces #undef with comments.  This is necessary, for
  6958. # example, in the case of _POSIX_SOURCE, which is predefined and required
  6959. # on some systems where configure will not decide to define it.
  6960. cat >> conftest.vals <<\EOF
  6961. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  6962. EOF
  6963.  
  6964. # Break up conftest.vals because some shells have a limit on
  6965. # the size of here documents, and old seds have small limits too.
  6966. # Maximum number of lines to put in a single here document.
  6967. ac_max_here_lines=12
  6968.  
  6969. rm -f conftest.tail
  6970. while :
  6971. do
  6972.   ac_lines=`grep -c . conftest.vals`
  6973.   # grep -c gives empty output for an empty file on some AIX systems.
  6974.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  6975.   # Write a limited-size here document to conftest.frag.
  6976.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  6977.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  6978.   echo 'CEOF
  6979.   sed -f conftest.frag conftest.in > conftest.out
  6980.   rm -f conftest.in
  6981.   mv conftest.out conftest.in
  6982. ' >> $CONFIG_STATUS
  6983.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  6984.   rm -f conftest.vals
  6985.   mv conftest.tail conftest.vals
  6986. done
  6987. rm -f conftest.vals
  6988.  
  6989. cat >> $CONFIG_STATUS <<\EOF
  6990.   rm -f conftest.frag conftest.h
  6991.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  6992.   cat conftest.in >> conftest.h
  6993.   rm -f conftest.in
  6994.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  6995.     echo "$ac_file is unchanged"
  6996.     rm -f conftest.h
  6997.   else
  6998.     rm -f $ac_file
  6999.     mv conftest.h $ac_file
  7000.   fi
  7001. fi; done
  7002.  
  7003.  
  7004.  
  7005. exit 0
  7006. EOF
  7007. chmod +x $CONFIG_STATUS
  7008. rm -fr confdefs* $ac_clean_files
  7009. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  7010.  
  7011.  
  7012. if test x$srcdir != x; then
  7013.     if test $srcdir != .; then
  7014.     cp $srcdir/VERSION VERSION
  7015.     mkdir nt
  7016.     cp $srcdir/nt/Makefile nt/Makefile
  7017.     fi
  7018. fi
  7019.  
  7020. if test "x$screen_manager" = xSLang; then
  7021.     screen_manager="${screen_manager}${slang_term}"
  7022. fi
  7023.  
  7024. echo "
  7025. Configuration:
  7026.  
  7027.   Source code location:       ${srcdir}
  7028.   Compiler:                  ${CC}
  7029.   Compiler flags:             ${CFLAGS}
  7030.   File system:                ${vfs_type}
  7031.                   ${vfs_flags}
  7032.   Text mode screen manager:   ${screen_manager}
  7033.   Install console saver:      ${install_saver}
  7034.   Text mode mouse library:    ${mouse_lib}
  7035.   Debugger code:              ${mem_debug}
  7036.   With subshell support:      ${subshell}
  7037.   X11 versions:               ${xvers}
  7038.   Install path:              ${prefix}/bin, ${prefix}/lib/mc"
  7039. if test -n "$xv_bindir"; then
  7040. echo "  XView version install path: ${xv_bindir}"
  7041. fi
  7042. echo ""
  7043.